;(function($) {
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (process,global){
/**
 * Copyright (c) 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
 * additional grant of patent rights can be found in the PATENTS file in
 * the same directory.
 */
!(function (global) {
    "use strict";
    var hasOwn = Object.prototype.hasOwnProperty;
    var undefined; // More compressible than void 0.
    var iteratorSymbol = typeof Symbol === "function" && Symbol.iterator || "@@iterator";
    var inModule = typeof module === "object";
    var runtime = global.regeneratorRuntime;
    if (runtime) {
        if (inModule) {
            // If regeneratorRuntime is defined globally and we're in a module,
            // make the exports object identical to regeneratorRuntime.
            module.exports = runtime;
        }
        // Don't bother evaluating the rest of this file if the runtime was
        // already defined globally.
        return;
    }
    // Define the runtime globally (as expected by generated code) as either
    // module.exports (if we're in a module) or a new, empty object.
    runtime = global.regeneratorRuntime = inModule ? module.exports : {};

    function wrap(innerFn, outerFn, self, tryLocsList) {
        // If outerFn provided, then outerFn.prototype instanceof Generator.
        var generator = Object.create((outerFn || Generator).prototype);
        var context = new Context(tryLocsList || []);
        // The ._invoke method unifies the implementations of the .next,
        // .throw, and .return methods.
        generator._invoke = makeInvokeMethod(innerFn, self, context);
        return generator;
    }
    runtime.wrap = wrap;
    // Try/catch helper to minimize deoptimizations. Returns a completion
    // record like context.tryEntries[i].completion. This interface could
    // have been (and was previously) designed to take a closure to be
    // invoked without arguments, but in all the cases we care about we
    // already have an existing method we want to call, so there's no need
    // to create a new function object. We can even get away with assuming
    // the method takes exactly one argument, since that happens to be true
    // in every case, so we don't have to touch the arguments object. The
    // only additional allocation required is the completion record, which
    // has a stable shape and so hopefully should be cheap to allocate.
    function tryCatch(fn, obj, arg) {
        try {
            return {
                type: "normal",
                arg: fn.call(obj, arg)
            };
        } catch (err) {
            return {
                type: "throw",
                arg: err
            };
        }
    }
    var GenStateSuspendedStart = "suspendedStart";
    var GenStateSuspendedYield = "suspendedYield";
    var GenStateExecuting = "executing";
    var GenStateCompleted = "completed";
    // Returning this object from the innerFn has the same effect as
    // breaking out of the dispatch switch statement.
    var ContinueSentinel = {};
    // Dummy constructor functions that we use as the .constructor and
    // .constructor.prototype properties for functions that return Generator
    // objects. For full spec compliance, you may wish to configure your
    // minifier not to mangle the names of these two functions.
    function Generator() {}

    function GeneratorFunction() {}

    function GeneratorFunctionPrototype() {}
    var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
    GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
    GeneratorFunctionPrototype.constructor = GeneratorFunction;
    GeneratorFunction.displayName = "GeneratorFunction";
    // Helper for defining the .next, .throw, and .return methods of the
    // Iterator interface in terms of a single ._invoke method.
    function defineIteratorMethods(prototype) {
        ["next", "throw", "return"].forEach(function (method) {
            prototype[method] = function (arg) {
                return this._invoke(method, arg);
            };
        });
    }
    runtime.isGeneratorFunction = function (genFun) {
        var ctor = typeof genFun === "function" && genFun.constructor;
        return ctor ? ctor === GeneratorFunction ||
            // For the native GeneratorFunction constructor, the best we can
            // do is to check its .name property.
            (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
    };
    runtime.mark = function (genFun) {
        if (Object.setPrototypeOf) {
            Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
        } else {
            genFun.__proto__ = GeneratorFunctionPrototype;
        }
        genFun.prototype = Object.create(Gp);
        return genFun;
    };
    // Within the body of any async function, `await x` is transformed to
    // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
    // `value instanceof AwaitArgument` to determine if the yielded value is
    // meant to be awaited. Some may consider the name of this method too
    // cutesy, but they are curmudgeons.
    runtime.awrap = function (arg) {
        return new AwaitArgument(arg);
    };

    function AwaitArgument(arg) {
        this.arg = arg;
    }

    function AsyncIterator(generator) {
        // This invoke function is written in a style that assumes some
        // calling function (or Promise) will handle exceptions.
        function invoke(method, arg) {
            var result = generator[method](arg);
            var value = result.value;
            return value instanceof AwaitArgument ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) : Promise.resolve(value).then(function (unwrapped) {
                // When a yielded Promise is resolved, its final value becomes
                // the .value of the Promise<{value,done}> result for the
                // current iteration. If the Promise is rejected, however, the
                // result for this iteration will be rejected with the same
                // reason. Note that rejections of yielded Promises are not
                // thrown back into the generator function, as is the case
                // when an awaited Promise is rejected. This difference in
                // behavior between yield and await is important, because it
                // allows the consumer to decide what to do with the yielded
                // rejection (swallow it and continue, manually .throw it back
                // into the generator, abandon iteration, whatever). With
                // await, by contrast, there is no opportunity to examine the
                // rejection reason outside the generator function, so the
                // only option is to throw it from the await expression, and
                // let the generator function handle the exception.
                result.value = unwrapped;
                return result;
            });
        }
        if (typeof process === "object" && process.domain) {
            invoke = process.domain.bind(invoke);
        }
        var invokeNext = invoke.bind(generator, "next");
        var invokeThrow = invoke.bind(generator, "throw");
        var invokeReturn = invoke.bind(generator, "return");
        var previousPromise;

        function enqueue(method, arg) {
                function callInvokeWithMethodAndArg() {
                    return invoke(method, arg);
                }
                return previousPromise =
                    // If enqueue has been called before, then we want to wait until
                    // all previous Promises have been resolved before calling invoke,
                    // so that results are always delivered in the correct order. If
                    // enqueue has not been called before, then it is important to
                    // call invoke immediately, without waiting on a callback to fire,
                    // so that the async generator function has the opportunity to do
                    // any necessary setup in a predictable way. This predictability
                    // is why the Promise constructor synchronously invokes its
                    // executor callback, and why async functions synchronously
                    // execute code before the first await. Since we implement simple
                    // async functions in terms of async generators, it is especially
                    // important to get this right, even though it requires care.
                    previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
                        // Avoid propagating failures to Promises returned by later
                        // invocations of the iterator.
                        callInvokeWithMethodAndArg) : new Promise(function (resolve) {
                        resolve(callInvokeWithMethodAndArg());
                    });
            }
            // Define the unified helper method that is used to implement .next,
            // .throw, and .return (see defineIteratorMethods).
        this._invoke = enqueue;
    }
    defineIteratorMethods(AsyncIterator.prototype);
    // Note that simple async functions are implemented on top of
    // AsyncIterator objects; they just return a Promise for the value of
    // the final result produced by the iterator.
    runtime.async = function (innerFn, outerFn, self, tryLocsList) {
        var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
        return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
            : iter.next().then(function (result) {
                return result.done ? result.value : iter.next();
            });
    };

    function makeInvokeMethod(innerFn, self, context) {
            var state = GenStateSuspendedStart;
            return function invoke(method, arg) {
                if (state === GenStateExecuting) {
                    throw new Error("Generator is already running");
                }
                if (state === GenStateCompleted) {
                    if (method === "throw") {
                        throw arg;
                    }
                    // Be forgiving, per 25.3.3.3.3 of the spec:
                    // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
                    return doneResult();
                }
                while (true) {
                    var delegate = context.delegate;
                    if (delegate) {
                        if (method === "return" || (method === "throw" && delegate.iterator[method] === undefined)) {
                            // A return or throw (when the delegate iterator has no throw
                            // method) always terminates the yield* loop.
                            context.delegate = null;
                            // If the delegate iterator has a return method, give it a
                            // chance to clean up.
                            var returnMethod = delegate.iterator["return"];
                            if (returnMethod) {
                                var record = tryCatch(returnMethod, delegate.iterator, arg);
                                if (record.type === "throw") {
                                    // If the return method threw an exception, let that
                                    // exception prevail over the original return or throw.
                                    method = "throw";
                                    arg = record.arg;
                                    continue;
                                }
                            }
                            if (method === "return") {
                                // Continue with the outer return, now that the delegate
                                // iterator has been terminated.
                                continue;
                            }
                        }
                        var record = tryCatch(delegate.iterator[method], delegate.iterator, arg);
                        if (record.type === "throw") {
                            context.delegate = null;
                            // Like returning generator.throw(uncaught), but without the
                            // overhead of an extra function call.
                            method = "throw";
                            arg = record.arg;
                            continue;
                        }
                        // Delegate generator ran and handled its own exceptions so
                        // regardless of what the method was, we continue as if it is
                        // "next" with an undefined arg.
                        method = "next";
                        arg = undefined;
                        var info = record.arg;
                        if (info.done) {
                            context[delegate.resultName] = info.value;
                            context.next = delegate.nextLoc;
                        } else {
                            state = GenStateSuspendedYield;
                            return info;
                        }
                        context.delegate = null;
                    }
                    if (method === "next") {
                        context._sent = arg;
                        if (state === GenStateSuspendedYield) {
                            context.sent = arg;
                        } else {
                            context.sent = undefined;
                        }
                    } else if (method === "throw") {
                        if (state === GenStateSuspendedStart) {
                            state = GenStateCompleted;
                            throw arg;
                        }
                        if (context.dispatchException(arg)) {
                            // If the dispatched exception was caught by a catch block,
                            // then let that catch block handle the exception normally.
                            method = "next";
                            arg = undefined;
                        }
                    } else if (method === "return") {
                        context.abrupt("return", arg);
                    }
                    state = GenStateExecuting;
                    var record = tryCatch(innerFn, self, context);
                    if (record.type === "normal") {
                        // If an exception is thrown from innerFn, we leave state ===
                        // GenStateExecuting and loop back for another invocation.
                        state = context.done ? GenStateCompleted : GenStateSuspendedYield;
                        var info = {
                            value: record.arg,
                            done: context.done
                        };
                        if (record.arg === ContinueSentinel) {
                            if (context.delegate && method === "next") {
                                // Deliberately forget the last sent value so that we don't
                                // accidentally pass it on to the delegate.
                                arg = undefined;
                            }
                        } else {
                            return info;
                        }
                    } else if (record.type === "throw") {
                        state = GenStateCompleted;
                        // Dispatch the exception by looping back around to the
                        // context.dispatchException(arg) call above.
                        method = "throw";
                        arg = record.arg;
                    }
                }
            };
        }
        // Define Generator.prototype.{next,throw,return} in terms of the
        // unified ._invoke helper method.
    defineIteratorMethods(Gp);
    Gp[iteratorSymbol] = function () {
        return this;
    };
    Gp.toString = function () {
        return "[object Generator]";
    };

    function pushTryEntry(locs) {
        var entry = {
            tryLoc: locs[0]
        };
        if (1 in locs) {
            entry.catchLoc = locs[1];
        }
        if (2 in locs) {
            entry.finallyLoc = locs[2];
            entry.afterLoc = locs[3];
        }
        this.tryEntries.push(entry);
    }

    function resetTryEntry(entry) {
        var record = entry.completion || {};
        record.type = "normal";
        delete record.arg;
        entry.completion = record;
    }

    function Context(tryLocsList) {
        // The root entry object (effectively a try statement without a catch
        // or a finally block) gives us a place to store values thrown from
        // locations where there is no enclosing try statement.
        this.tryEntries = [{
            tryLoc: "root"
        }];
        tryLocsList.forEach(pushTryEntry, this);
        this.reset(true);
    }
    runtime.keys = function (object) {
        var keys = [];
        for (var key in object) {
            keys.push(key);
        }
        keys.reverse();
        // Rather than returning an object with a next method, we keep
        // things simple and return the next function itself.
        return function next() {
            while (keys.length) {
                var key = keys.pop();
                if (key in object) {
                    next.value = key;
                    next.done = false;
                    return next;
                }
            }
            // To avoid creating an additional object, we just hang the .value
            // and .done properties off the next function object itself. This
            // also ensures that the minifier will not anonymize the function.
            next.done = true;
            return next;
        };
    };

    function values(iterable) {
        if (iterable) {
            var iteratorMethod = iterable[iteratorSymbol];
            if (iteratorMethod) {
                return iteratorMethod.call(iterable);
            }
            if (typeof iterable.next === "function") {
                return iterable;
            }
            if (!isNaN(iterable.length)) {
                var i = -1,
                    next = function next() {
                        while (++i < iterable.length) {
                            if (hasOwn.call(iterable, i)) {
                                next.value = iterable[i];
                                next.done = false;
                                return next;
                            }
                        }
                        next.value = undefined;
                        next.done = true;
                        return next;
                    };
                return next.next = next;
            }
        }
        // Return an iterator with no values.
        return {
            next: doneResult
        };
    }
    runtime.values = values;

    function doneResult() {
        return {
            value: undefined,
            done: true
        };
    }
    Context.prototype = {
        constructor: Context,
        reset: function (skipTempReset) {
                this.prev = 0;
                this.next = 0;
                this.sent = undefined;
                this.done = false;
                this.delegate = null;
                this.tryEntries.forEach(resetTryEntry);
                if (!skipTempReset) {
                    for (var name in this) {
                        // Not sure about the optimal order of these conditions:
                        if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
                            this[name] = undefined;
                        }
                    }
                }
            },
            stop: function () {
                this.done = true;
                var rootEntry = this.tryEntries[0];
                var rootRecord = rootEntry.completion;
                if (rootRecord.type === "throw") {
                    throw rootRecord.arg;
                }
                return this.rval;
            },
            dispatchException: function (exception) {
                if (this.done) {
                    throw exception;
                }
                var context = this;

                function handle(loc, caught) {
                    record.type = "throw";
                    record.arg = exception;
                    context.next = loc;
                    return !!caught;
                }
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                    var entry = this.tryEntries[i];
                    var record = entry.completion;
                    if (entry.tryLoc === "root") {
                        // Exception thrown outside of any try block that could handle
                        // it, so set the completion value of the entire function to
                        // throw the exception.
                        return handle("end");
                    }
                    if (entry.tryLoc <= this.prev) {
                        var hasCatch = hasOwn.call(entry, "catchLoc");
                        var hasFinally = hasOwn.call(entry, "finallyLoc");
                        if (hasCatch && hasFinally) {
                            if (this.prev < entry.catchLoc) {
                                return handle(entry.catchLoc, true);
                            } else if (this.prev < entry.finallyLoc) {
                                return handle(entry.finallyLoc);
                            }
                        } else if (hasCatch) {
                            if (this.prev < entry.catchLoc) {
                                return handle(entry.catchLoc, true);
                            }
                        } else if (hasFinally) {
                            if (this.prev < entry.finallyLoc) {
                                return handle(entry.finallyLoc);
                            }
                        } else {
                            throw new Error("try statement without catch or finally");
                        }
                    }
                }
            },
            abrupt: function (type, arg) {
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                    var entry = this.tryEntries[i];
                    if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
                        var finallyEntry = entry;
                        break;
                    }
                }
                if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
                    // Ignore the finally entry if control is not jumping to a
                    // location outside the try/catch block.
                    finallyEntry = null;
                }
                var record = finallyEntry ? finallyEntry.completion : {};
                record.type = type;
                record.arg = arg;
                if (finallyEntry) {
                    this.next = finallyEntry.finallyLoc;
                } else {
                    this.complete(record);
                }
                return ContinueSentinel;
            },
            complete: function (record, afterLoc) {
                if (record.type === "throw") {
                    throw record.arg;
                }
                if (record.type === "break" || record.type === "continue") {
                    this.next = record.arg;
                } else if (record.type === "return") {
                    this.rval = record.arg;
                    this.next = "end";
                } else if (record.type === "normal" && afterLoc) {
                    this.next = afterLoc;
                }
            },
            finish: function (finallyLoc) {
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                    var entry = this.tryEntries[i];
                    if (entry.finallyLoc === finallyLoc) {
                        this.complete(entry.completion, entry.afterLoc);
                        resetTryEntry(entry);
                        return ContinueSentinel;
                    }
                }
            }, "catch": function (tryLoc) {
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                    var entry = this.tryEntries[i];
                    if (entry.tryLoc === tryLoc) {
                        var record = entry.completion;
                        if (record.type === "throw") {
                            var thrown = record.arg;
                            resetTryEntry(entry);
                        }
                        return thrown;
                    }
                }
                // The context.catch method must only be called with a location
                // argument that corresponds to a known catch block.
                throw new Error("illegal catch attempt");
            },
            delegateYield: function (iterable, resultName, nextLoc) {
                this.delegate = {
                    iterator: values(iterable),
                    resultName: resultName,
                    nextLoc: nextLoc
                };
                return ContinueSentinel;
            }
    };
})(
    // Among the various tricks for obtaining a reference to the global
    // object, this seems to be the most reliable technique that does not
    // use indirect eval (which violates Content Security Policy).
    typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : this);
}).call(this, require('_process'), typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}, {
    "_process": 152
}], 2: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/array/from"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/array/from": 27
    }
], 3: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/get-iterator"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/get-iterator": 28
    }
], 4: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/is-iterable"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/is-iterable": 29
    }
], 5: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/map"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/map": 30
    }
], 6: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/assign"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/assign": 31
    }
], 7: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/create"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/create": 32
    }
], 8: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/define-property"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/define-property": 33
    }
], 9: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/get-own-property-descriptor"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/get-own-property-descriptor": 34
    }
], 10: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/get-prototype-of"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/get-prototype-of": 35
    }
], 11: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/keys"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/keys": 36
    }
], 12: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/object/set-prototype-of"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/object/set-prototype-of": 37
    }
], 13: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/promise"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/promise": 38
    }
], 14: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/symbol"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/symbol": 39
    }
], 15: [

    function (require, module, exports) {
        module.exports = {
            "default": require("core-js/library/fn/symbol/iterator"),
            __esModule: true
        };
    }, {
        "core-js/library/fn/symbol/iterator": 40
    }
], 16: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _promise = require("../core-js/promise");
        var _promise2 = _interopRequireDefault(_promise);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function (fn) {
            return function () {
                var gen = fn.apply(this, arguments);
                return new _promise2.default(function (resolve, reject) {
                    function step(key, arg) {
                        try {
                            var info = gen[key](arg);
                            var value = info.value;
                        } catch (error) {
                            reject(error);
                            return;
                        }
                        if (info.done) {
                            resolve(value);
                        } else {
                            return _promise2.default.resolve(value).then(function (value) {
                                step("next", value);
                            }, function (err) {
                                step("throw", err);
                            });
                        }
                    }
                    return step("next");
                });
            };
        };
    }, {
        "../core-js/promise": 13
    }
], 17: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        exports.default = function (instance, Constructor) {
            if (!(instance instanceof Constructor)) {
                throw new TypeError("Cannot call a class as a function");
            }
        };
    }, {}
], 18: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _defineProperty = require("../core-js/object/define-property");
        var _defineProperty2 = _interopRequireDefault(_defineProperty);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function () {
            function defineProperties(target, props) {
                for (var i = 0; i < props.length; i++) {
                    var descriptor = props[i];
                    descriptor.enumerable = descriptor.enumerable || false;
                    descriptor.configurable = true;
                    if ("value" in descriptor) descriptor.writable = true;
                    (0, _defineProperty2.default)(target, descriptor.key, descriptor);
                }
            }
            return function (Constructor, protoProps, staticProps) {
                if (protoProps) defineProperties(Constructor.prototype, protoProps);
                if (staticProps) defineProperties(Constructor, staticProps);
                return Constructor;
            };
        }();
    }, {
        "../core-js/object/define-property": 8
    }
], 19: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _getPrototypeOf = require("../core-js/object/get-prototype-of");
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor");
        var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function get(object, property, receiver) {
            if (object === null) object = Function.prototype;
            var desc = (0, _getOwnPropertyDescriptor2.default)(object, property);
            if (desc === undefined) {
                var parent = (0, _getPrototypeOf2.default)(object);
                if (parent === null) {
                    return undefined;
                } else {
                    return get(parent, property, receiver);
                }
            } else if ("value" in desc) {
                return desc.value;
            } else {
                var getter = desc.get;
                if (getter === undefined) {
                    return undefined;
                }
                return getter.call(receiver);
            }
        };
    }, {
        "../core-js/object/get-own-property-descriptor": 9,
        "../core-js/object/get-prototype-of": 10
    }
], 20: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _setPrototypeOf = require("../core-js/object/set-prototype-of");
        var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
        var _create = require("../core-js/object/create");
        var _create2 = _interopRequireDefault(_create);
        var _typeof2 = require("../helpers/typeof");
        var _typeof3 = _interopRequireDefault(_typeof2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function (subClass, superClass) {
            if (typeof superClass !== "function" && superClass !== null) {
                throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
            }
            subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
                constructor: {
                    value: subClass,
                    enumerable: false,
                    writable: true,
                    configurable: true
                }
            });
            if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
        };
    }, {
        "../core-js/object/create": 7,
        "../core-js/object/set-prototype-of": 12,
        "../helpers/typeof": 25
    }
], 21: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        exports.default = function (obj, keys) {
            var target = {};
            for (var i in obj) {
                if (keys.indexOf(i) >= 0) continue;
                if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
                target[i] = obj[i];
            }
            return target;
        };
    }, {}
], 22: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _typeof2 = require("../helpers/typeof");
        var _typeof3 = _interopRequireDefault(_typeof2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function (self, call) {
            if (!self) {
                throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
            }
            return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
        };
    }, {
        "../helpers/typeof": 25
    }
], 23: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _isIterable2 = require("../core-js/is-iterable");
        var _isIterable3 = _interopRequireDefault(_isIterable2);
        var _getIterator2 = require("../core-js/get-iterator");
        var _getIterator3 = _interopRequireDefault(_getIterator2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function () {
            function sliceIterator(arr, i) {
                var _arr = [];
                var _n = true;
                var _d = false;
                var _e = undefined;
                try {
                    for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
                        _arr.push(_s.value);
                        if (i && _arr.length === i) break;
                    }
                } catch (err) {
                    _d = true;
                    _e = err;
                } finally {
                    try {
                        if (!_n && _i["return"]) _i["return"]();
                    } finally {
                        if (_d) throw _e;
                    }
                }
                return _arr;
            }
            return function (arr, i) {
                if (Array.isArray(arr)) {
                    return arr;
                } else if ((0, _isIterable3.default)(Object(arr))) {
                    return sliceIterator(arr, i);
                } else {
                    throw new TypeError("Invalid attempt to destructure non-iterable instance");
                }
            };
        }();
    }, {
        "../core-js/get-iterator": 3,
        "../core-js/is-iterable": 4
    }
], 24: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _from = require("../core-js/array/from");
        var _from2 = _interopRequireDefault(_from);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = function (arr) {
            if (Array.isArray(arr)) {
                for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
                    arr2[i] = arr[i];
                }
                return arr2;
            } else {
                return (0, _from2.default)(arr);
            }
        };
    }, {
        "../core-js/array/from": 2
    }
], 25: [

    function (require, module, exports) {
        "use strict";
        exports.__esModule = true;
        var _iterator = require("../core-js/symbol/iterator");
        var _iterator2 = _interopRequireDefault(_iterator);
        var _symbol = require("../core-js/symbol");
        var _symbol2 = _interopRequireDefault(_symbol);
        var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) {
            return typeof obj;
        } : function (obj) {
            return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj;
        };

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
            return typeof obj === "undefined" ? "undefined" : _typeof(obj);
        } : function (obj) {
            return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
        };
    }, {
        "../core-js/symbol": 14,
        "../core-js/symbol/iterator": 15
    }
], 26: [

    function (require, module, exports) {
        module.exports = require("regenerator-runtime");
    }, {
        "regenerator-runtime": 153
    }
], 27: [

    function (require, module, exports) {
        require('../../modules/es6.string.iterator');
        require('../../modules/es6.array.from');
        module.exports = require('../../modules/_core').Array.from;
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.array.from": 129,
        "../../modules/es6.string.iterator": 141
    }
], 28: [

    function (require, module, exports) {
        require('../modules/web.dom.iterable');
        require('../modules/es6.string.iterator');
        module.exports = require('../modules/core.get-iterator');
    }, {
        "../modules/core.get-iterator": 127,
        "../modules/es6.string.iterator": 141,
        "../modules/web.dom.iterable": 150
    }
], 29: [

    function (require, module, exports) {
        require('../modules/web.dom.iterable');
        require('../modules/es6.string.iterator');
        module.exports = require('../modules/core.is-iterable');
    }, {
        "../modules/core.is-iterable": 128,
        "../modules/es6.string.iterator": 141,
        "../modules/web.dom.iterable": 150
    }
], 30: [

    function (require, module, exports) {
        require('../modules/es6.object.to-string');
        require('../modules/es6.string.iterator');
        require('../modules/web.dom.iterable');
        require('../modules/es6.map');
        require('../modules/es7.map.to-json');
        require('../modules/es7.map.of');
        require('../modules/es7.map.from');
        module.exports = require('../modules/_core').Map;
    }, {
        "../modules/_core": 55,
        "../modules/es6.map": 131,
        "../modules/es6.object.to-string": 139,
        "../modules/es6.string.iterator": 141,
        "../modules/es7.map.from": 143,
        "../modules/es7.map.of": 144,
        "../modules/es7.map.to-json": 145,
        "../modules/web.dom.iterable": 150
    }
], 31: [

    function (require, module, exports) {
        require('../../modules/es6.object.assign');
        module.exports = require('../../modules/_core').Object.assign;
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.assign": 132
    }
], 32: [

    function (require, module, exports) {
        require('../../modules/es6.object.create');
        var $Object = require('../../modules/_core').Object;
        module.exports = function create(P, D) {
            return $Object.create(P, D);
        };
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.create": 133
    }
], 33: [

    function (require, module, exports) {
        require('../../modules/es6.object.define-property');
        var $Object = require('../../modules/_core').Object;
        module.exports = function defineProperty(it, key, desc) {
            return $Object.defineProperty(it, key, desc);
        };
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.define-property": 134
    }
], 34: [

    function (require, module, exports) {
        require('../../modules/es6.object.get-own-property-descriptor');
        var $Object = require('../../modules/_core').Object;
        module.exports = function getOwnPropertyDescriptor(it, key) {
            return $Object.getOwnPropertyDescriptor(it, key);
        };
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.get-own-property-descriptor": 135
    }
], 35: [

    function (require, module, exports) {
        require('../../modules/es6.object.get-prototype-of');
        module.exports = require('../../modules/_core').Object.getPrototypeOf;
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.get-prototype-of": 136
    }
], 36: [

    function (require, module, exports) {
        require('../../modules/es6.object.keys');
        module.exports = require('../../modules/_core').Object.keys;
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.keys": 137
    }
], 37: [

    function (require, module, exports) {
        require('../../modules/es6.object.set-prototype-of');
        module.exports = require('../../modules/_core').Object.setPrototypeOf;
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.set-prototype-of": 138
    }
], 38: [

    function (require, module, exports) {
        require('../modules/es6.object.to-string');
        require('../modules/es6.string.iterator');
        require('../modules/web.dom.iterable');
        require('../modules/es6.promise');
        require('../modules/es7.promise.finally');
        require('../modules/es7.promise.try');
        module.exports = require('../modules/_core').Promise;
    }, {
        "../modules/_core": 55,
        "../modules/es6.object.to-string": 139,
        "../modules/es6.promise": 140,
        "../modules/es6.string.iterator": 141,
        "../modules/es7.promise.finally": 146,
        "../modules/es7.promise.try": 147,
        "../modules/web.dom.iterable": 150
    }
], 39: [

    function (require, module, exports) {
        require('../../modules/es6.symbol');
        require('../../modules/es6.object.to-string');
        require('../../modules/es7.symbol.async-iterator');
        require('../../modules/es7.symbol.observable');
        module.exports = require('../../modules/_core').Symbol;
    }, {
        "../../modules/_core": 55,
        "../../modules/es6.object.to-string": 139,
        "../../modules/es6.symbol": 142,
        "../../modules/es7.symbol.async-iterator": 148,
        "../../modules/es7.symbol.observable": 149
    }
], 40: [

    function (require, module, exports) {
        require('../../modules/es6.string.iterator');
        require('../../modules/web.dom.iterable');
        module.exports = require('../../modules/_wks-ext').f('iterator');
    }, {
        "../../modules/_wks-ext": 124,
        "../../modules/es6.string.iterator": 141,
        "../../modules/web.dom.iterable": 150
    }
], 41: [

    function (require, module, exports) {
        module.exports = function (it) {
            if (typeof it != 'function') throw TypeError(it + ' is not a function!');
            return it;
        };
    }, {}
], 42: [

    function (require, module, exports) {
        module.exports = function () { /* empty */ };
    }, {}
], 43: [

    function (require, module, exports) {
        module.exports = function (it, Constructor, name, forbiddenField) {
            if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
                throw TypeError(name + ': incorrect invocation!');
            }
            return it;
        };
    }, {}
], 44: [

    function (require, module, exports) {
        var isObject = require('./_is-object');
        module.exports = function (it) {
            if (!isObject(it)) throw TypeError(it + ' is not an object!');
            return it;
        };
    }, {
        "./_is-object": 75
    }
], 45: [

    function (require, module, exports) {
        var forOf = require('./_for-of');
        module.exports = function (iter, ITERATOR) {
            var result = [];
            forOf(iter, false, result.push, result, ITERATOR);
            return result;
        };
    }, {
        "./_for-of": 65
    }
], 46: [

    function (require, module, exports) {
        // false -> Array#indexOf
        // true  -> Array#includes
        var toIObject = require('./_to-iobject');
        var toLength = require('./_to-length');
        var toAbsoluteIndex = require('./_to-absolute-index');
        module.exports = function (IS_INCLUDES) {
            return function ($this, el, fromIndex) {
                var O = toIObject($this);
                var length = toLength(O.length);
                var index = toAbsoluteIndex(fromIndex, length);
                var value;
                // Array#includes uses SameValueZero equality algorithm
                // eslint-disable-next-line no-self-compare
                if (IS_INCLUDES && el != el)
                    while (length > index) {
                        value = O[index++];
                        // eslint-disable-next-line no-self-compare
                        if (value != value) return true;
                        // Array#indexOf ignores holes, Array#includes - not
                    } else
                        for (; length > index; index++)
                            if (IS_INCLUDES || index in O) {
                                if (O[index] === el) return IS_INCLUDES || index || 0;
                            }
                return !IS_INCLUDES && -1;
            };
        };
    }, {
        "./_to-absolute-index": 115,
        "./_to-iobject": 117,
        "./_to-length": 118
    }
], 47: [

    function (require, module, exports) {
        // 0 -> Array#forEach
        // 1 -> Array#map
        // 2 -> Array#filter
        // 3 -> Array#some
        // 4 -> Array#every
        // 5 -> Array#find
        // 6 -> Array#findIndex
        var ctx = require('./_ctx');
        var IObject = require('./_iobject');
        var toObject = require('./_to-object');
        var toLength = require('./_to-length');
        var asc = require('./_array-species-create');
        module.exports = function (TYPE, $create) {
            var IS_MAP = TYPE == 1;
            var IS_FILTER = TYPE == 2;
            var IS_SOME = TYPE == 3;
            var IS_EVERY = TYPE == 4;
            var IS_FIND_INDEX = TYPE == 6;
            var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
            var create = $create || asc;
            return function ($this, callbackfn, that) {
                var O = toObject($this);
                var self = IObject(O);
                var f = ctx(callbackfn, that, 3);
                var length = toLength(self.length);
                var index = 0;
                var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
                var val, res;
                for (; length > index; index++)
                    if (NO_HOLES || index in self) {
                        val = self[index];
                        res = f(val, index, O);
                        if (TYPE) {
                            if (IS_MAP) result[index] = res; // map
                            else if (res) switch (TYPE) {
                                case 3:
                                    return true; // some
                                case 5:
                                    return val; // find
                                case 6:
                                    return index; // findIndex
                                case 2:
                                    result.push(val); // filter
                                } else if (IS_EVERY) return false; // every
                        }
                    }
                return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
            };
        };
    }, {
        "./_array-species-create": 49,
        "./_ctx": 57,
        "./_iobject": 72,
        "./_to-length": 118,
        "./_to-object": 119
    }
], 48: [

    function (require, module, exports) {
        var isObject = require('./_is-object');
        var isArray = require('./_is-array');
        var SPECIES = require('./_wks')('species');
        module.exports = function (original) {
            var C;
            if (isArray(original)) {
                C = original.constructor;
                // cross-realm fallback
                if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
                if (isObject(C)) {
                    C = C[SPECIES];
                    if (C === null) C = undefined;
                }
            }
            return C === undefined ? Array : C;
        };
    }, {
        "./_is-array": 74,
        "./_is-object": 75,
        "./_wks": 125
    }
], 49: [

    function (require, module, exports) {
        // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
        var speciesConstructor = require('./_array-species-constructor');
        module.exports = function (original, length) {
            return new(speciesConstructor(original))(length);
        };
    }, {
        "./_array-species-constructor": 48
    }
], 50: [

    function (require, module, exports) {
        // getting tag from 19.1.3.6 Object.prototype.toString()
        var cof = require('./_cof');
        var TAG = require('./_wks')('toStringTag');
        // ES3 wrong here
        var ARG = cof(function () {
            return arguments;
        }()) == 'Arguments';
        // fallback for IE11 Script Access Denied error
        var tryGet = function (it, key) {
            try {
                return it[key];
            } catch (e) { /* empty */ }
        };
        module.exports = function (it) {
            var O, T, B;
            return it === undefined ? 'Undefined' : it === null ? 'Null'
                // @@toStringTag case
                : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
                // builtinTag case
                : ARG ? cof(O)
                // ES3 arguments fallback
                : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
        };
    }, {
        "./_cof": 51,
        "./_wks": 125
    }
], 51: [

    function (require, module, exports) {
        var toString = {}.toString;
        module.exports = function (it) {
            return toString.call(it).slice(8, -1);
        };
    }, {}
], 52: [

    function (require, module, exports) {
        'use strict';
        var dP = require('./_object-dp').f;
        var create = require('./_object-create');
        var redefineAll = require('./_redefine-all');
        var ctx = require('./_ctx');
        var anInstance = require('./_an-instance');
        var forOf = require('./_for-of');
        var $iterDefine = require('./_iter-define');
        var step = require('./_iter-step');
        var setSpecies = require('./_set-species');
        var DESCRIPTORS = require('./_descriptors');
        var fastKey = require('./_meta').fastKey;
        var validate = require('./_validate-collection');
        var SIZE = DESCRIPTORS ? '_s' : 'size';
        var getEntry = function (that, key) {
            // fast case
            var index = fastKey(key);
            var entry;
            if (index !== 'F') return that._i[index];
            // frozen object case
            for (entry = that._f; entry; entry = entry.n) {
                if (entry.k == key) return entry;
            }
        };
        module.exports = {
            getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
                    var C = wrapper(function (that, iterable) {
                        anInstance(that, C, NAME, '_i');
                        that._t = NAME; // collection type
                        that._i = create(null); // index
                        that._f = undefined; // first entry
                        that._l = undefined; // last entry
                        that[SIZE] = 0; // size
                        if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
                    });
                    redefineAll(C.prototype, {
                        // 23.1.3.1 Map.prototype.clear()
                        // 23.2.3.2 Set.prototype.clear()
                        clear: function clear() {
                                for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
                                    entry.r = true;
                                    if (entry.p) entry.p = entry.p.n = undefined;
                                    delete data[entry.i];
                                }
                                that._f = that._l = undefined;
                                that[SIZE] = 0;
                            },
                            // 23.1.3.3 Map.prototype.delete(key)
                            // 23.2.3.4 Set.prototype.delete(value)
                            'delete': function (key) {
                                var that = validate(this, NAME);
                                var entry = getEntry(that, key);
                                if (entry) {
                                    var next = entry.n;
                                    var prev = entry.p;
                                    delete that._i[entry.i];
                                    entry.r = true;
                                    if (prev) prev.n = next;
                                    if (next) next.p = prev;
                                    if (that._f == entry) that._f = next;
                                    if (that._l == entry) that._l = prev;
                                    that[SIZE]--;
                                }
                                return !!entry;
                            },
                            // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
                            // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
                            forEach: function forEach(callbackfn /* , that = undefined */ ) {
                                validate(this, NAME);
                                var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
                                var entry;
                                while (entry = entry ? entry.n : this._f) {
                                    f(entry.v, entry.k, this);
                                    // revert to the last existing entry
                                    while (entry && entry.r) entry = entry.p;
                                }
                            },
                            // 23.1.3.7 Map.prototype.has(key)
                            // 23.2.3.7 Set.prototype.has(value)
                            has: function has(key) {
                                return !!getEntry(validate(this, NAME), key);
                            }
                    });
                    if (DESCRIPTORS) dP(C.prototype, 'size', {
                        get: function () {
                            return validate(this, NAME)[SIZE];
                        }
                    });
                    return C;
                },
                def: function (that, key, value) {
                    var entry = getEntry(that, key);
                    var prev, index;
                    // change existing entry
                    if (entry) {
                        entry.v = value;
                        // create new entry
                    } else {
                        that._l = entry = {
                            i: index = fastKey(key, true), // <- index
                            k: key, // <- key
                            v: value, // <- value
                            p: prev = that._l, // <- previous entry
                            n: undefined, // <- next entry
                            r: false // <- removed
                        };
                        if (!that._f) that._f = entry;
                        if (prev) prev.n = entry;
                        that[SIZE]++;
                        // add to index
                        if (index !== 'F') that._i[index] = entry;
                    }
                    return that;
                },
                getEntry: getEntry,
            setStrong: function (C, NAME, IS_MAP) {
                // add .keys, .values, .entries, [@@iterator]
                // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
                $iterDefine(C, NAME, function (iterated, kind) {
                    this._t = validate(iterated, NAME); // target
                    this._k = kind; // kind
                    this._l = undefined; // previous
                }, function () {
                    var that = this;
                    var kind = that._k;
                    var entry = that._l;
                    // revert to the last existing entry
                    while (entry && entry.r) entry = entry.p;
                    // get next entry
                    if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
                        // or finish the iteration
                        that._t = undefined;
                        return step(1);
                    }
                    // return step by kind
                    if (kind == 'keys') return step(0, entry.k);
                    if (kind == 'values') return step(0, entry.v);
                    return step(0, [entry.k, entry.v]);
                }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
                // add [@@species], 23.1.2.2, 23.2.2.2
                setSpecies(NAME);
            }
        };
    }, {
        "./_an-instance": 43,
        "./_ctx": 57,
        "./_descriptors": 59,
        "./_for-of": 65,
        "./_iter-define": 78,
        "./_iter-step": 80,
        "./_meta": 84,
        "./_object-create": 88,
        "./_object-dp": 89,
        "./_redefine-all": 103,
        "./_set-species": 108,
        "./_validate-collection": 122
    }
], 53: [

    function (require, module, exports) {
        // https://github.com/DavidBruant/Map-Set.prototype.toJSON
        var classof = require('./_classof');
        var from = require('./_array-from-iterable');
        module.exports = function (NAME) {
            return function toJSON() {
                if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
                return from(this);
            };
        };
    }, {
        "./_array-from-iterable": 45,
        "./_classof": 50
    }
], 54: [

    function (require, module, exports) {
        'use strict';
        var global = require('./_global');
        var $export = require('./_export');
        var meta = require('./_meta');
        var fails = require('./_fails');
        var hide = require('./_hide');
        var redefineAll = require('./_redefine-all');
        var forOf = require('./_for-of');
        var anInstance = require('./_an-instance');
        var isObject = require('./_is-object');
        var setToStringTag = require('./_set-to-string-tag');
        var dP = require('./_object-dp').f;
        var each = require('./_array-methods')(0);
        var DESCRIPTORS = require('./_descriptors');
        module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
            var Base = global[NAME];
            var C = Base;
            var ADDER = IS_MAP ? 'set' : 'add';
            var proto = C && C.prototype;
            var O = {};
            if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
                new C().entries().next();
            }))) {
                // create collection constructor
                C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
                redefineAll(C.prototype, methods);
                meta.NEED = true;
            } else {
                C = wrapper(function (target, iterable) {
                    anInstance(target, C, NAME, '_c');
                    target._c = new Base();
                    if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);
                });
                each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {
                    var IS_ADDER = KEY == 'add' || KEY == 'set';
                    if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {
                        anInstance(this, C, KEY);
                        if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
                        var result = this._c[KEY](a === 0 ? 0 : a, b);
                        return IS_ADDER ? this : result;
                    });
                });
                IS_WEAK || dP(C.prototype, 'size', {
                    get: function () {
                        return this._c.size;
                    }
                });
            }
            setToStringTag(C, NAME);
            O[NAME] = C;
            $export($export.G + $export.W + $export.F, O);
            if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
            return C;
        };
    }, {
        "./_an-instance": 43,
        "./_array-methods": 47,
        "./_descriptors": 59,
        "./_export": 63,
        "./_fails": 64,
        "./_for-of": 65,
        "./_global": 66,
        "./_hide": 68,
        "./_is-object": 75,
        "./_meta": 84,
        "./_object-dp": 89,
        "./_redefine-all": 103,
        "./_set-to-string-tag": 109
    }
], 55: [

    function (require, module, exports) {
        var core = module.exports = {
            version: '2.5.0'
        };
        if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
    }, {}
], 56: [

    function (require, module, exports) {
        'use strict';
        var $defineProperty = require('./_object-dp');
        var createDesc = require('./_property-desc');
        module.exports = function (object, index, value) {
            if (index in object) $defineProperty.f(object, index, createDesc(0, value));
            else object[index] = value;
        };
    }, {
        "./_object-dp": 89,
        "./_property-desc": 102
    }
], 57: [

    function (require, module, exports) {
        // optional / simple context binding
        var aFunction = require('./_a-function');
        module.exports = function (fn, that, length) {
            aFunction(fn);
            if (that === undefined) return fn;
            switch (length) {
            case 1:
                return function (a) {
                    return fn.call(that, a);
                };
            case 2:
                return function (a, b) {
                    return fn.call(that, a, b);
                };
            case 3:
                return function (a, b, c) {
                    return fn.call(that, a, b, c);
                };
            }
            return function ( /* ...args */ ) {
                return fn.apply(that, arguments);
            };
        };
    }, {
        "./_a-function": 41
    }
], 58: [

    function (require, module, exports) {
        // 7.2.1 RequireObjectCoercible(argument)
        module.exports = function (it) {
            if (it == undefined) throw TypeError("Can't call method on  " + it);
            return it;
        };
    }, {}
], 59: [

    function (require, module, exports) {
        // Thank's IE8 for his funny defineProperty
        module.exports = !require('./_fails')(function () {
            return Object.defineProperty({}, 'a', {
                get: function () {
                    return 7;
                }
            }).a != 7;
        });
    }, {
        "./_fails": 64
    }
], 60: [

    function (require, module, exports) {
        var isObject = require('./_is-object');
        var document = require('./_global').document;
        // typeof document.createElement is 'object' in old IE
        var is = isObject(document) && isObject(document.createElement);
        module.exports = function (it) {
            return is ? document.createElement(it) : {};
        };
    }, {
        "./_global": 66,
        "./_is-object": 75
    }
], 61: [

    function (require, module, exports) {
        // IE 8- don't enum bug keys
        module.exports = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf').split(',');
    }, {}
], 62: [

    function (require, module, exports) {
        // all enumerable object keys, includes symbols
        var getKeys = require('./_object-keys');
        var gOPS = require('./_object-gops');
        var pIE = require('./_object-pie');
        module.exports = function (it) {
            var result = getKeys(it);
            var getSymbols = gOPS.f;
            if (getSymbols) {
                var symbols = getSymbols(it);
                var isEnum = pIE.f;
                var i = 0;
                var key;
                while (symbols.length > i)
                    if (isEnum.call(it, key = symbols[i++])) result.push(key);
            }
            return result;
        };
    }, {
        "./_object-gops": 94,
        "./_object-keys": 97,
        "./_object-pie": 98
    }
], 63: [

    function (require, module, exports) {
        var global = require('./_global');
        var core = require('./_core');
        var ctx = require('./_ctx');
        var hide = require('./_hide');
        var PROTOTYPE = 'prototype';
        var $export = function (type, name, source) {
            var IS_FORCED = type & $export.F;
            var IS_GLOBAL = type & $export.G;
            var IS_STATIC = type & $export.S;
            var IS_PROTO = type & $export.P;
            var IS_BIND = type & $export.B;
            var IS_WRAP = type & $export.W;
            var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
            var expProto = exports[PROTOTYPE];
            var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
            var key, own, out;
            if (IS_GLOBAL) source = name;
            for (key in source) {
                // contains in native
                own = !IS_FORCED && target && target[key] !== undefined;
                if (own && key in exports) continue;
                // export native or passed
                out = own ? target[key] : source[key];
                // prevent global pollution for namespaces
                exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
                    // bind timers to global for call from export context
                    : IS_BIND && own ? ctx(out, global)
                    // wrap global constructors for prevent change them in library
                    : IS_WRAP && target[key] == out ? (function (C) {
                        var F = function (a, b, c) {
                            if (this instanceof C) {
                                switch (arguments.length) {
                                case 0:
                                    return new C();
                                case 1:
                                    return new C(a);
                                case 2:
                                    return new C(a, b);
                                }
                                return new C(a, b, c);
                            }
                            return C.apply(this, arguments);
                        };
                        F[PROTOTYPE] = C[PROTOTYPE];
                        return F;
                        // make static versions for prototype methods
                    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
                // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
                if (IS_PROTO) {
                    (exports.virtual || (exports.virtual = {}))[key] = out;
                    // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
                    if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
                }
            }
        };
        // type bitmap
        $export.F = 1; // forced
        $export.G = 2; // global
        $export.S = 4; // static
        $export.P = 8; // proto
        $export.B = 16; // bind
        $export.W = 32; // wrap
        $export.U = 64; // safe
        $export.R = 128; // real proto method for `library`
        module.exports = $export;
    }, {
        "./_core": 55,
        "./_ctx": 57,
        "./_global": 66,
        "./_hide": 68
    }
], 64: [

    function (require, module, exports) {
        module.exports = function (exec) {
            try {
                return !!exec();
            } catch (e) {
                return true;
            }
        };
    }, {}
], 65: [

    function (require, module, exports) {
        var ctx = require('./_ctx');
        var call = require('./_iter-call');
        var isArrayIter = require('./_is-array-iter');
        var anObject = require('./_an-object');
        var toLength = require('./_to-length');
        var getIterFn = require('./core.get-iterator-method');
        var BREAK = {};
        var RETURN = {};
        var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
            var iterFn = ITERATOR ? function () {
                return iterable;
            } : getIterFn(iterable);
            var f = ctx(fn, that, entries ? 2 : 1);
            var index = 0;
            var length, step, iterator, result;
            if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
            // fast case for arrays with default iterator
            if (isArrayIter(iterFn))
                for (length = toLength(iterable.length); length > index; index++) {
                    result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
                    if (result === BREAK || result === RETURN) return result;
                } else
                    for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
                        result = call(iterator, f, step.value, entries);
                        if (result === BREAK || result === RETURN) return result;
                    }
        };
        exports.BREAK = BREAK;
        exports.RETURN = RETURN;
    }, {
        "./_an-object": 44,
        "./_ctx": 57,
        "./_is-array-iter": 73,
        "./_iter-call": 76,
        "./_to-length": 118,
        "./core.get-iterator-method": 126
    }
], 66: [

    function (require, module, exports) {
        // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
        var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self
            // eslint-disable-next-line no-new-func
            : Function('return this')();
        if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
    }, {}
], 67: [

    function (require, module, exports) {
        var hasOwnProperty = {}.hasOwnProperty;
        module.exports = function (it, key) {
            return hasOwnProperty.call(it, key);
        };
    }, {}
], 68: [

    function (require, module, exports) {
        var dP = require('./_object-dp');
        var createDesc = require('./_property-desc');
        module.exports = require('./_descriptors') ? function (object, key, value) {
            return dP.f(object, key, createDesc(1, value));
        } : function (object, key, value) {
            object[key] = value;
            return object;
        };
    }, {
        "./_descriptors": 59,
        "./_object-dp": 89,
        "./_property-desc": 102
    }
], 69: [

    function (require, module, exports) {
        var document = require('./_global').document;
        module.exports = document && document.documentElement;
    }, {
        "./_global": 66
    }
], 70: [

    function (require, module, exports) {
        module.exports = !require('./_descriptors') && !require('./_fails')(function () {
            return Object.defineProperty(require('./_dom-create')('div'), 'a', {
                get: function () {
                    return 7;
                }
            }).a != 7;
        });
    }, {
        "./_descriptors": 59,
        "./_dom-create": 60,
        "./_fails": 64
    }
], 71: [

    function (require, module, exports) {
        // fast apply, http://jsperf.lnkit.com/fast-apply/5
        module.exports = function (fn, args, that) {
            var un = that === undefined;
            switch (args.length) {
            case 0:
                return un ? fn() : fn.call(that);
            case 1:
                return un ? fn(args[0]) : fn.call(that, args[0]);
            case 2:
                return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]);
            case 3:
                return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]);
            case 4:
                return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]);
            }
            return fn.apply(that, args);
        };
    }, {}
], 72: [

    function (require, module, exports) {
        // fallback for non-array-like ES3 and non-enumerable old V8 strings
        var cof = require('./_cof');
        // eslint-disable-next-line no-prototype-builtins
        module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
            return cof(it) == 'String' ? it.split('') : Object(it);
        };
    }, {
        "./_cof": 51
    }
], 73: [

    function (require, module, exports) {
        // check on default Array iterator
        var Iterators = require('./_iterators');
        var ITERATOR = require('./_wks')('iterator');
        var ArrayProto = Array.prototype;
        module.exports = function (it) {
            return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
        };
    }, {
        "./_iterators": 81,
        "./_wks": 125
    }
], 74: [

    function (require, module, exports) {
        // 7.2.2 IsArray(argument)
        var cof = require('./_cof');
        module.exports = Array.isArray || function isArray(arg) {
            return cof(arg) == 'Array';
        };
    }, {
        "./_cof": 51
    }
], 75: [

    function (require, module, exports) {
        module.exports = function (it) {
            return typeof it === 'object' ? it !== null : typeof it === 'function';
        };
    }, {}
], 76: [

    function (require, module, exports) {
        // call something on iterator step with safe closing on error
        var anObject = require('./_an-object');
        module.exports = function (iterator, fn, value, entries) {
            try {
                return entries ? fn(anObject(value)[0], value[1]) : fn(value);
                // 7.4.6 IteratorClose(iterator, completion)
            } catch (e) {
                var ret = iterator['return'];
                if (ret !== undefined) anObject(ret.call(iterator));
                throw e;
            }
        };
    }, {
        "./_an-object": 44
    }
], 77: [

    function (require, module, exports) {
        'use strict';
        var create = require('./_object-create');
        var descriptor = require('./_property-desc');
        var setToStringTag = require('./_set-to-string-tag');
        var IteratorPrototype = {};
        // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
        require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () {
            return this;
        });
        module.exports = function (Constructor, NAME, next) {
            Constructor.prototype = create(IteratorPrototype, {
                next: descriptor(1, next)
            });
            setToStringTag(Constructor, NAME + ' Iterator');
        };
    }, {
        "./_hide": 68,
        "./_object-create": 88,
        "./_property-desc": 102,
        "./_set-to-string-tag": 109,
        "./_wks": 125
    }
], 78: [

    function (require, module, exports) {
        'use strict';
        var LIBRARY = require('./_library');
        var $export = require('./_export');
        var redefine = require('./_redefine');
        var hide = require('./_hide');
        var has = require('./_has');
        var Iterators = require('./_iterators');
        var $iterCreate = require('./_iter-create');
        var setToStringTag = require('./_set-to-string-tag');
        var getPrototypeOf = require('./_object-gpo');
        var ITERATOR = require('./_wks')('iterator');
        var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
        var FF_ITERATOR = '@@iterator';
        var KEYS = 'keys';
        var VALUES = 'values';
        var returnThis = function () {
            return this;
        };
        module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
            $iterCreate(Constructor, NAME, next);
            var getMethod = function (kind) {
                if (!BUGGY && kind in proto) return proto[kind];
                switch (kind) {
                case KEYS:
                    return function keys() {
                        return new Constructor(this, kind);
                    };
                case VALUES:
                    return function values() {
                        return new Constructor(this, kind);
                    };
                }
                return function entries() {
                    return new Constructor(this, kind);
                };
            };
            var TAG = NAME + ' Iterator';
            var DEF_VALUES = DEFAULT == VALUES;
            var VALUES_BUG = false;
            var proto = Base.prototype;
            var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
            var $default = $native || getMethod(DEFAULT);
            var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
            var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
            var methods, key, IteratorPrototype;
            // Fix native
            if ($anyNative) {
                IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
                if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
                    // Set @@toStringTag to native iterators
                    setToStringTag(IteratorPrototype, TAG, true);
                    // fix for some old engines
                    if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
                }
            }
            // fix Array#{values, @@iterator}.name in V8 / FF
            if (DEF_VALUES && $native && $native.name !== VALUES) {
                VALUES_BUG = true;
                $default = function values() {
                    return $native.call(this);
                };
            }
            // Define iterator
            if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
                hide(proto, ITERATOR, $default);
            }
            // Plug for library
            Iterators[NAME] = $default;
            Iterators[TAG] = returnThis;
            if (DEFAULT) {
                methods = {
                    values: DEF_VALUES ? $default : getMethod(VALUES),
                    keys: IS_SET ? $default : getMethod(KEYS),
                    entries: $entries
                };
                if (FORCED)
                    for (key in methods) {
                        if (!(key in proto)) redefine(proto, key, methods[key]);
                    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
            }
            return methods;
        };
    }, {
        "./_export": 63,
        "./_has": 67,
        "./_hide": 68,
        "./_iter-create": 77,
        "./_iterators": 81,
        "./_library": 83,
        "./_object-gpo": 95,
        "./_redefine": 104,
        "./_set-to-string-tag": 109,
        "./_wks": 125
    }
], 79: [

    function (require, module, exports) {
        var ITERATOR = require('./_wks')('iterator');
        var SAFE_CLOSING = false;
        try {
            var riter = [7][ITERATOR]();
            riter['return'] = function () {
                SAFE_CLOSING = true;
            };
            // eslint-disable-next-line no-throw-literal
            Array.from(riter, function () {
                throw 2;
            });
        } catch (e) { /* empty */ }
        module.exports = function (exec, skipClosing) {
            if (!skipClosing && !SAFE_CLOSING) return false;
            var safe = false;
            try {
                var arr = [7];
                var iter = arr[ITERATOR]();
                iter.next = function () {
                    return {
                        done: safe = true
                    };
                };
                arr[ITERATOR] = function () {
                    return iter;
                };
                exec(arr);
            } catch (e) { /* empty */ }
            return safe;
        };
    }, {
        "./_wks": 125
    }
], 80: [

    function (require, module, exports) {
        module.exports = function (done, value) {
            return {
                value: value,
                done: !!done
            };
        };
    }, {}
], 81: [

    function (require, module, exports) {
        module.exports = {};
    }, {}
], 82: [

    function (require, module, exports) {
        var getKeys = require('./_object-keys');
        var toIObject = require('./_to-iobject');
        module.exports = function (object, el) {
            var O = toIObject(object);
            var keys = getKeys(O);
            var length = keys.length;
            var index = 0;
            var key;
            while (length > index)
                if (O[key = keys[index++]] === el) return key;
        };
    }, {
        "./_object-keys": 97,
        "./_to-iobject": 117
    }
], 83: [

    function (require, module, exports) {
        module.exports = true;
    }, {}
], 84: [

    function (require, module, exports) {
        var META = require('./_uid')('meta');
        var isObject = require('./_is-object');
        var has = require('./_has');
        var setDesc = require('./_object-dp').f;
        var id = 0;
        var isExtensible = Object.isExtensible || function () {
            return true;
        };
        var FREEZE = !require('./_fails')(function () {
            return isExtensible(Object.preventExtensions({}));
        });
        var setMeta = function (it) {
            setDesc(it, META, {
                value: {
                    i: 'O' + ++id, // object ID
                    w: {} // weak collections IDs
                }
            });
        };
        var fastKey = function (it, create) {
            // return primitive with prefix
            if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
            if (!has(it, META)) {
                // can't set metadata to uncaught frozen object
                if (!isExtensible(it)) return 'F';
                // not necessary to add metadata
                if (!create) return 'E';
                // add missing metadata
                setMeta(it);
                // return object ID
            }
            return it[META].i;
        };
        var getWeak = function (it, create) {
            if (!has(it, META)) {
                // can't set metadata to uncaught frozen object
                if (!isExtensible(it)) return true;
                // not necessary to add metadata
                if (!create) return false;
                // add missing metadata
                setMeta(it);
                // return hash weak collections IDs
            }
            return it[META].w;
        };
        // add metadata on freeze-family methods calling
        var onFreeze = function (it) {
            if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
            return it;
        };
        var meta = module.exports = {
            KEY: META,
            NEED: false,
            fastKey: fastKey,
            getWeak: getWeak,
            onFreeze: onFreeze
        };
    }, {
        "./_fails": 64,
        "./_has": 67,
        "./_is-object": 75,
        "./_object-dp": 89,
        "./_uid": 121
    }
], 85: [

    function (require, module, exports) {
        var global = require('./_global');
        var macrotask = require('./_task').set;
        var Observer = global.MutationObserver || global.WebKitMutationObserver;
        var process = global.process;
        var Promise = global.Promise;
        var isNode = require('./_cof')(process) == 'process';
        module.exports = function () {
            var head, last, notify;
            var flush = function () {
                var parent, fn;
                if (isNode && (parent = process.domain)) parent.exit();
                while (head) {
                    fn = head.fn;
                    head = head.next;
                    try {
                        fn();
                    } catch (e) {
                        if (head) notify();
                        else last = undefined;
                        throw e;
                    }
                }
                last = undefined;
                if (parent) parent.enter();
            };
            // Node.js
            if (isNode) {
                notify = function () {
                    process.nextTick(flush);
                };
                // browsers with MutationObserver
            } else if (Observer) {
                var toggle = true;
                var node = document.createTextNode('');
                new Observer(flush).observe(node, {
                    characterData: true
                }); // eslint-disable-line no-new
                notify = function () {
                    node.data = toggle = !toggle;
                };
                // environments with maybe non-completely correct, but existent Promise
            } else if (Promise && Promise.resolve) {
                var promise = Promise.resolve();
                notify = function () {
                    promise.then(flush);
                };
                // for other environments - macrotask based on:
                // - setImmediate
                // - MessageChannel
                // - window.postMessag
                // - onreadystatechange
                // - setTimeout
            } else {
                notify = function () {
                    // strange IE + webpack dev server bug - use .call(global)
                    macrotask.call(global, flush);
                };
            }
            return function (fn) {
                var task = {
                    fn: fn,
                    next: undefined
                };
                if (last) last.next = task;
                if (!head) {
                    head = task;
                    notify();
                }
                last = task;
            };
        };
    }, {
        "./_cof": 51,
        "./_global": 66,
        "./_task": 114
    }
], 86: [

    function (require, module, exports) {
        'use strict';
        // 25.4.1.5 NewPromiseCapability(C)
        var aFunction = require('./_a-function');

        function PromiseCapability(C) {
            var resolve, reject;
            this.promise = new C(function ($$resolve, $$reject) {
                if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
                resolve = $$resolve;
                reject = $$reject;
            });
            this.resolve = aFunction(resolve);
            this.reject = aFunction(reject);
        }
        module.exports.f = function (C) {
            return new PromiseCapability(C);
        };
    }, {
        "./_a-function": 41
    }
], 87: [

    function (require, module, exports) {
        'use strict';
        // 19.1.2.1 Object.assign(target, source, ...)
        var getKeys = require('./_object-keys');
        var gOPS = require('./_object-gops');
        var pIE = require('./_object-pie');
        var toObject = require('./_to-object');
        var IObject = require('./_iobject');
        var $assign = Object.assign;
        // should work with symbols and should have deterministic property order (V8 bug)
        module.exports = !$assign || require('./_fails')(function () {
            var A = {};
            var B = {};
            // eslint-disable-next-line no-undef
            var S = Symbol();
            var K = 'abcdefghijklmnopqrst';
            A[S] = 7;
            K.split('').forEach(function (k) {
                B[k] = k;
            });
            return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
        }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
            var T = toObject(target);
            var aLen = arguments.length;
            var index = 1;
            var getSymbols = gOPS.f;
            var isEnum = pIE.f;
            while (aLen > index) {
                var S = IObject(arguments[index++]);
                var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
                var length = keys.length;
                var j = 0;
                var key;
                while (length > j)
                    if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
            }
            return T;
        } : $assign;
    }, {
        "./_fails": 64,
        "./_iobject": 72,
        "./_object-gops": 94,
        "./_object-keys": 97,
        "./_object-pie": 98,
        "./_to-object": 119
    }
], 88: [

    function (require, module, exports) {
        // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
        var anObject = require('./_an-object');
        var dPs = require('./_object-dps');
        var enumBugKeys = require('./_enum-bug-keys');
        var IE_PROTO = require('./_shared-key')('IE_PROTO');
        var Empty = function () { /* empty */ };
        var PROTOTYPE = 'prototype';
        // Create object with fake `null` prototype: use iframe Object with cleared prototype
        var createDict = function () {
            // Thrash, waste and sodomy: IE GC bug
            var iframe = require('./_dom-create')('iframe');
            var i = enumBugKeys.length;
            var lt = '<';
            var gt = '>';
            var iframeDocument;
            iframe.style.display = 'none';
            require('./_html').appendChild(iframe);
            iframe.src = 'javascript:'; // eslint-disable-line no-script-url
            // createDict = iframe.contentWindow.Object;
            // html.removeChild(iframe);
            iframeDocument = iframe.contentWindow.document;
            iframeDocument.open();
            iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
            iframeDocument.close();
            createDict = iframeDocument.F;
            while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
            return createDict();
        };
        module.exports = Object.create || function create(O, Properties) {
            var result;
            if (O !== null) {
                Empty[PROTOTYPE] = anObject(O);
                result = new Empty();
                Empty[PROTOTYPE] = null;
                // add "__proto__" for Object.getPrototypeOf polyfill
                result[IE_PROTO] = O;
            } else result = createDict();
            return Properties === undefined ? result : dPs(result, Properties);
        };
    }, {
        "./_an-object": 44,
        "./_dom-create": 60,
        "./_enum-bug-keys": 61,
        "./_html": 69,
        "./_object-dps": 90,
        "./_shared-key": 110
    }
], 89: [

    function (require, module, exports) {
        var anObject = require('./_an-object');
        var IE8_DOM_DEFINE = require('./_ie8-dom-define');
        var toPrimitive = require('./_to-primitive');
        var dP = Object.defineProperty;
        exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {
            anObject(O);
            P = toPrimitive(P, true);
            anObject(Attributes);
            if (IE8_DOM_DEFINE) try {
                return dP(O, P, Attributes);
            } catch (e) { /* empty */ }
            if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
            if ('value' in Attributes) O[P] = Attributes.value;
            return O;
        };
    }, {
        "./_an-object": 44,
        "./_descriptors": 59,
        "./_ie8-dom-define": 70,
        "./_to-primitive": 120
    }
], 90: [

    function (require, module, exports) {
        var dP = require('./_object-dp');
        var anObject = require('./_an-object');
        var getKeys = require('./_object-keys');
        module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {
            anObject(O);
            var keys = getKeys(Properties);
            var length = keys.length;
            var i = 0;
            var P;
            while (length > i) dP.f(O, P = keys[i++], Properties[P]);
            return O;
        };
    }, {
        "./_an-object": 44,
        "./_descriptors": 59,
        "./_object-dp": 89,
        "./_object-keys": 97
    }
], 91: [

    function (require, module, exports) {
        var pIE = require('./_object-pie');
        var createDesc = require('./_property-desc');
        var toIObject = require('./_to-iobject');
        var toPrimitive = require('./_to-primitive');
        var has = require('./_has');
        var IE8_DOM_DEFINE = require('./_ie8-dom-define');
        var gOPD = Object.getOwnPropertyDescriptor;
        exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {
            O = toIObject(O);
            P = toPrimitive(P, true);
            if (IE8_DOM_DEFINE) try {
                return gOPD(O, P);
            } catch (e) { /* empty */ }
            if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
        };
    }, {
        "./_descriptors": 59,
        "./_has": 67,
        "./_ie8-dom-define": 70,
        "./_object-pie": 98,
        "./_property-desc": 102,
        "./_to-iobject": 117,
        "./_to-primitive": 120
    }
], 92: [

    function (require, module, exports) {
        // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
        var toIObject = require('./_to-iobject');
        var gOPN = require('./_object-gopn').f;
        var toString = {}.toString;
        var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
        var getWindowNames = function (it) {
            try {
                return gOPN(it);
            } catch (e) {
                return windowNames.slice();
            }
        };
        module.exports.f = function getOwnPropertyNames(it) {
            return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
        };
    }, {
        "./_object-gopn": 93,
        "./_to-iobject": 117
    }
], 93: [

    function (require, module, exports) {
        // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
        var $keys = require('./_object-keys-internal');
        var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
        exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
            return $keys(O, hiddenKeys);
        };
    }, {
        "./_enum-bug-keys": 61,
        "./_object-keys-internal": 96
    }
], 94: [

    function (require, module, exports) {
        exports.f = Object.getOwnPropertySymbols;
    }, {}
], 95: [

    function (require, module, exports) {
        // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
        var has = require('./_has');
        var toObject = require('./_to-object');
        var IE_PROTO = require('./_shared-key')('IE_PROTO');
        var ObjectProto = Object.prototype;
        module.exports = Object.getPrototypeOf || function (O) {
            O = toObject(O);
            if (has(O, IE_PROTO)) return O[IE_PROTO];
            if (typeof O.constructor == 'function' && O instanceof O.constructor) {
                return O.constructor.prototype;
            }
            return O instanceof Object ? ObjectProto : null;
        };
    }, {
        "./_has": 67,
        "./_shared-key": 110,
        "./_to-object": 119
    }
], 96: [

    function (require, module, exports) {
        var has = require('./_has');
        var toIObject = require('./_to-iobject');
        var arrayIndexOf = require('./_array-includes')(false);
        var IE_PROTO = require('./_shared-key')('IE_PROTO');
        module.exports = function (object, names) {
            var O = toIObject(object);
            var i = 0;
            var result = [];
            var key;
            for (key in O)
                if (key != IE_PROTO) has(O, key) && result.push(key);
                // Don't enum bug & hidden keys
            while (names.length > i)
                if (has(O, key = names[i++])) {~
                    arrayIndexOf(result, key) || result.push(key);
                }
            return result;
        };
    }, {
        "./_array-includes": 46,
        "./_has": 67,
        "./_shared-key": 110,
        "./_to-iobject": 117
    }
], 97: [

    function (require, module, exports) {
        // 19.1.2.14 / 15.2.3.14 Object.keys(O)
        var $keys = require('./_object-keys-internal');
        var enumBugKeys = require('./_enum-bug-keys');
        module.exports = Object.keys || function keys(O) {
            return $keys(O, enumBugKeys);
        };
    }, {
        "./_enum-bug-keys": 61,
        "./_object-keys-internal": 96
    }
], 98: [

    function (require, module, exports) {
        exports.f = {}.propertyIsEnumerable;
    }, {}
], 99: [

    function (require, module, exports) {
        // most Object methods by ES6 should accept primitives
        var $export = require('./_export');
        var core = require('./_core');
        var fails = require('./_fails');
        module.exports = function (KEY, exec) {
            var fn = (core.Object || {})[KEY] || Object[KEY];
            var exp = {};
            exp[KEY] = exec(fn);
            $export($export.S + $export.F * fails(function () {
                fn(1);
            }), 'Object', exp);
        };
    }, {
        "./_core": 55,
        "./_export": 63,
        "./_fails": 64
    }
], 100: [

    function (require, module, exports) {
        module.exports = function (exec) {
            try {
                return {
                    e: false,
                    v: exec()
                };
            } catch (e) {
                return {
                    e: true,
                    v: e
                };
            }
        };
    }, {}
], 101: [

    function (require, module, exports) {
        var newPromiseCapability = require('./_new-promise-capability');
        module.exports = function (C, x) {
            var promiseCapability = newPromiseCapability.f(C);
            var resolve = promiseCapability.resolve;
            resolve(x);
            return promiseCapability.promise;
        };
    }, {
        "./_new-promise-capability": 86
    }
], 102: [

    function (require, module, exports) {
        module.exports = function (bitmap, value) {
            return {
                enumerable: !(bitmap & 1),
                configurable: !(bitmap & 2),
                writable: !(bitmap & 4),
                value: value
            };
        };
    }, {}
], 103: [

    function (require, module, exports) {
        var hide = require('./_hide');
        module.exports = function (target, src, safe) {
            for (var key in src) {
                if (safe && target[key]) target[key] = src[key];
                else hide(target, key, src[key]);
            }
            return target;
        };
    }, {
        "./_hide": 68
    }
], 104: [

    function (require, module, exports) {
        module.exports = require('./_hide');
    }, {
        "./_hide": 68
    }
], 105: [

    function (require, module, exports) {
        'use strict';
        // https://tc39.github.io/proposal-setmap-offrom/
        var $export = require('./_export');
        var aFunction = require('./_a-function');
        var ctx = require('./_ctx');
        var forOf = require('./_for-of');
        module.exports = function (COLLECTION) {
            $export($export.S, COLLECTION, {
                from: function from(source /* , mapFn, thisArg */ ) {
                    var mapFn = arguments[1];
                    var mapping, A, n, cb;
                    aFunction(this);
                    mapping = mapFn !== undefined;
                    if (mapping) aFunction(mapFn);
                    if (source == undefined) return new this();
                    A = [];
                    if (mapping) {
                        n = 0;
                        cb = ctx(mapFn, arguments[2], 2);
                        forOf(source, false, function (nextItem) {
                            A.push(cb(nextItem, n++));
                        });
                    } else {
                        forOf(source, false, A.push, A);
                    }
                    return new this(A);
                }
            });
        };
    }, {
        "./_a-function": 41,
        "./_ctx": 57,
        "./_export": 63,
        "./_for-of": 65
    }
], 106: [

    function (require, module, exports) {
        'use strict';
        // https://tc39.github.io/proposal-setmap-offrom/
        var $export = require('./_export');
        module.exports = function (COLLECTION) {
            $export($export.S, COLLECTION, {
                of: function of() {
                    var length = arguments.length;
                    var A = Array(length);
                    while (length--) A[length] = arguments[length];
                    return new this(A);
                }
            });
        };
    }, {
        "./_export": 63
    }
], 107: [

    function (require, module, exports) {
        // Works with __proto__ only. Old v8 can't work with null proto objects.
        /* eslint-disable no-proto */
        var isObject = require('./_is-object');
        var anObject = require('./_an-object');
        var check = function (O, proto) {
            anObject(O);
            if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
        };
        module.exports = {
            set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
                function (test, buggy, set) {
                    try {
                        set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
                        set(test, []);
                        buggy = !(test instanceof Array);
                    } catch (e) {
                        buggy = true;
                    }
                    return function setPrototypeOf(O, proto) {
                        check(O, proto);
                        if (buggy) O.__proto__ = proto;
                        else set(O, proto);
                        return O;
                    };
                }({}, false) : undefined),
            check: check
        };
    }, {
        "./_an-object": 44,
        "./_ctx": 57,
        "./_is-object": 75,
        "./_object-gopd": 91
    }
], 108: [

    function (require, module, exports) {
        'use strict';
        var global = require('./_global');
        var core = require('./_core');
        var dP = require('./_object-dp');
        var DESCRIPTORS = require('./_descriptors');
        var SPECIES = require('./_wks')('species');
        module.exports = function (KEY) {
            var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
            if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
                configurable: true,
                get: function () {
                    return this;
                }
            });
        };
    }, {
        "./_core": 55,
        "./_descriptors": 59,
        "./_global": 66,
        "./_object-dp": 89,
        "./_wks": 125
    }
], 109: [

    function (require, module, exports) {
        var def = require('./_object-dp').f;
        var has = require('./_has');
        var TAG = require('./_wks')('toStringTag');
        module.exports = function (it, tag, stat) {
            if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {
                configurable: true,
                value: tag
            });
        };
    }, {
        "./_has": 67,
        "./_object-dp": 89,
        "./_wks": 125
    }
], 110: [

    function (require, module, exports) {
        var shared = require('./_shared')('keys');
        var uid = require('./_uid');
        module.exports = function (key) {
            return shared[key] || (shared[key] = uid(key));
        };
    }, {
        "./_shared": 111,
        "./_uid": 121
    }
], 111: [

    function (require, module, exports) {
        var global = require('./_global');
        var SHARED = '__core-js_shared__';
        var store = global[SHARED] || (global[SHARED] = {});
        module.exports = function (key) {
            return store[key] || (store[key] = {});
        };
    }, {
        "./_global": 66
    }
], 112: [

    function (require, module, exports) {
        // 7.3.20 SpeciesConstructor(O, defaultConstructor)
        var anObject = require('./_an-object');
        var aFunction = require('./_a-function');
        var SPECIES = require('./_wks')('species');
        module.exports = function (O, D) {
            var C = anObject(O).constructor;
            var S;
            return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
        };
    }, {
        "./_a-function": 41,
        "./_an-object": 44,
        "./_wks": 125
    }
], 113: [

    function (require, module, exports) {
        var toInteger = require('./_to-integer');
        var defined = require('./_defined');
        // true  -> String#at
        // false -> String#codePointAt
        module.exports = function (TO_STRING) {
            return function (that, pos) {
                var s = String(defined(that));
                var i = toInteger(pos);
                var l = s.length;
                var a, b;
                if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
                a = s.charCodeAt(i);
                return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
            };
        };
    }, {
        "./_defined": 58,
        "./_to-integer": 116
    }
], 114: [

    function (require, module, exports) {
        var ctx = require('./_ctx');
        var invoke = require('./_invoke');
        var html = require('./_html');
        var cel = require('./_dom-create');
        var global = require('./_global');
        var process = global.process;
        var setTask = global.setImmediate;
        var clearTask = global.clearImmediate;
        var MessageChannel = global.MessageChannel;
        var Dispatch = global.Dispatch;
        var counter = 0;
        var queue = {};
        var ONREADYSTATECHANGE = 'onreadystatechange';
        var defer, channel, port;
        var run = function () {
            var id = +this;
            // eslint-disable-next-line no-prototype-builtins
            if (queue.hasOwnProperty(id)) {
                var fn = queue[id];
                delete queue[id];
                fn();
            }
        };
        var listener = function (event) {
            run.call(event.data);
        };
        // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
        if (!setTask || !clearTask) {
            setTask = function setImmediate(fn) {
                var args = [];
                var i = 1;
                while (arguments.length > i) args.push(arguments[i++]);
                queue[++counter] = function () {
                    // eslint-disable-next-line no-new-func
                    invoke(typeof fn == 'function' ? fn : Function(fn), args);
                };
                defer(counter);
                return counter;
            };
            clearTask = function clearImmediate(id) {
                delete queue[id];
            };
            // Node.js 0.8-
            if (require('./_cof')(process) == 'process') {
                defer = function (id) {
                    process.nextTick(ctx(run, id, 1));
                };
                // Sphere (JS game engine) Dispatch API
            } else if (Dispatch && Dispatch.now) {
                defer = function (id) {
                    Dispatch.now(ctx(run, id, 1));
                };
                // Browsers with MessageChannel, includes WebWorkers
            } else if (MessageChannel) {
                channel = new MessageChannel();
                port = channel.port2;
                channel.port1.onmessage = listener;
                defer = ctx(port.postMessage, port, 1);
                // Browsers with postMessage, skip WebWorkers
                // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
            } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
                defer = function (id) {
                    global.postMessage(id + '', '*');
                };
                global.addEventListener('message', listener, false);
                // IE8-
            } else if (ONREADYSTATECHANGE in cel('script')) {
                defer = function (id) {
                    html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
                        html.removeChild(this);
                        run.call(id);
                    };
                };
                // Rest old browsers
            } else {
                defer = function (id) {
                    setTimeout(ctx(run, id, 1), 0);
                };
            }
        }
        module.exports = {
            set: setTask,
            clear: clearTask
        };
    }, {
        "./_cof": 51,
        "./_ctx": 57,
        "./_dom-create": 60,
        "./_global": 66,
        "./_html": 69,
        "./_invoke": 71
    }
], 115: [

    function (require, module, exports) {
        var toInteger = require('./_to-integer');
        var max = Math.max;
        var min = Math.min;
        module.exports = function (index, length) {
            index = toInteger(index);
            return index < 0 ? max(index + length, 0) : min(index, length);
        };
    }, {
        "./_to-integer": 116
    }
], 116: [

    function (require, module, exports) {
        // 7.1.4 ToInteger
        var ceil = Math.ceil;
        var floor = Math.floor;
        module.exports = function (it) {
            return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
        };
    }, {}
], 117: [

    function (require, module, exports) {
        // to indexed object, toObject with fallback for non-array-like ES3 strings
        var IObject = require('./_iobject');
        var defined = require('./_defined');
        module.exports = function (it) {
            return IObject(defined(it));
        };
    }, {
        "./_defined": 58,
        "./_iobject": 72
    }
], 118: [

    function (require, module, exports) {
        // 7.1.15 ToLength
        var toInteger = require('./_to-integer');
        var min = Math.min;
        module.exports = function (it) {
            return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
        };
    }, {
        "./_to-integer": 116
    }
], 119: [

    function (require, module, exports) {
        // 7.1.13 ToObject(argument)
        var defined = require('./_defined');
        module.exports = function (it) {
            return Object(defined(it));
        };
    }, {
        "./_defined": 58
    }
], 120: [

    function (require, module, exports) {
        // 7.1.1 ToPrimitive(input [, PreferredType])
        var isObject = require('./_is-object');
        // instead of the ES6 spec version, we didn't implement @@toPrimitive case
        // and the second argument - flag - preferred type is a string
        module.exports = function (it, S) {
            if (!isObject(it)) return it;
            var fn, val;
            if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
            if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
            if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
            throw TypeError("Can't convert object to primitive value");
        };
    }, {
        "./_is-object": 75
    }
], 121: [

    function (require, module, exports) {
        var id = 0;
        var px = Math.random();
        module.exports = function (key) {
            return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
        };
    }, {}
], 122: [

    function (require, module, exports) {
        var isObject = require('./_is-object');
        module.exports = function (it, TYPE) {
            if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
            return it;
        };
    }, {
        "./_is-object": 75
    }
], 123: [

    function (require, module, exports) {
        var global = require('./_global');
        var core = require('./_core');
        var LIBRARY = require('./_library');
        var wksExt = require('./_wks-ext');
        var defineProperty = require('./_object-dp').f;
        module.exports = function (name) {
            var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
            if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, {
                value: wksExt.f(name)
            });
        };
    }, {
        "./_core": 55,
        "./_global": 66,
        "./_library": 83,
        "./_object-dp": 89,
        "./_wks-ext": 124
    }
], 124: [

    function (require, module, exports) {
        exports.f = require('./_wks');
    }, {
        "./_wks": 125
    }
], 125: [

    function (require, module, exports) {
        var store = require('./_shared')('wks');
        var uid = require('./_uid');
        var Symbol = require('./_global').Symbol;
        var USE_SYMBOL = typeof Symbol == 'function';
        var $exports = module.exports = function (name) {
            return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
        };
        $exports.store = store;
    }, {
        "./_global": 66,
        "./_shared": 111,
        "./_uid": 121
    }
], 126: [

    function (require, module, exports) {
        var classof = require('./_classof');
        var ITERATOR = require('./_wks')('iterator');
        var Iterators = require('./_iterators');
        module.exports = require('./_core').getIteratorMethod = function (it) {
            if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];
        };
    }, {
        "./_classof": 50,
        "./_core": 55,
        "./_iterators": 81,
        "./_wks": 125
    }
], 127: [

    function (require, module, exports) {
        var anObject = require('./_an-object');
        var get = require('./core.get-iterator-method');
        module.exports = require('./_core').getIterator = function (it) {
            var iterFn = get(it);
            if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
            return anObject(iterFn.call(it));
        };
    }, {
        "./_an-object": 44,
        "./_core": 55,
        "./core.get-iterator-method": 126
    }
], 128: [

    function (require, module, exports) {
        var classof = require('./_classof');
        var ITERATOR = require('./_wks')('iterator');
        var Iterators = require('./_iterators');
        module.exports = require('./_core').isIterable = function (it) {
            var O = Object(it);
            return O[ITERATOR] !== undefined || '@@iterator' in O
                // eslint-disable-next-line no-prototype-builtins
                || Iterators.hasOwnProperty(classof(O));
        };
    }, {
        "./_classof": 50,
        "./_core": 55,
        "./_iterators": 81,
        "./_wks": 125
    }
], 129: [

    function (require, module, exports) {
        'use strict';
        var ctx = require('./_ctx');
        var $export = require('./_export');
        var toObject = require('./_to-object');
        var call = require('./_iter-call');
        var isArrayIter = require('./_is-array-iter');
        var toLength = require('./_to-length');
        var createProperty = require('./_create-property');
        var getIterFn = require('./core.get-iterator-method');
        $export($export.S + $export.F * !require('./_iter-detect')(function (iter) {
            Array.from(iter);
        }), 'Array', {
            // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
            from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */ ) {
                var O = toObject(arrayLike);
                var C = typeof this == 'function' ? this : Array;
                var aLen = arguments.length;
                var mapfn = aLen > 1 ? arguments[1] : undefined;
                var mapping = mapfn !== undefined;
                var index = 0;
                var iterFn = getIterFn(O);
                var length, result, step, iterator;
                if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
                // if object isn't iterable or it's array with default iterator - use simple case
                if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
                    for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
                        createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
                    }
                } else {
                    length = toLength(O.length);
                    for (result = new C(length); length > index; index++) {
                        createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
                    }
                }
                result.length = index;
                return result;
            }
        });
    }, {
        "./_create-property": 56,
        "./_ctx": 57,
        "./_export": 63,
        "./_is-array-iter": 73,
        "./_iter-call": 76,
        "./_iter-detect": 79,
        "./_to-length": 118,
        "./_to-object": 119,
        "./core.get-iterator-method": 126
    }
], 130: [

    function (require, module, exports) {
        'use strict';
        var addToUnscopables = require('./_add-to-unscopables');
        var step = require('./_iter-step');
        var Iterators = require('./_iterators');
        var toIObject = require('./_to-iobject');
        // 22.1.3.4 Array.prototype.entries()
        // 22.1.3.13 Array.prototype.keys()
        // 22.1.3.29 Array.prototype.values()
        // 22.1.3.30 Array.prototype[@@iterator]()
        module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {
            this._t = toIObject(iterated); // target
            this._i = 0; // next index
            this._k = kind; // kind
            // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
        }, function () {
            var O = this._t;
            var kind = this._k;
            var index = this._i++;
            if (!O || index >= O.length) {
                this._t = undefined;
                return step(1);
            }
            if (kind == 'keys') return step(0, index);
            if (kind == 'values') return step(0, O[index]);
            return step(0, [index, O[index]]);
        }, 'values');
        // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
        Iterators.Arguments = Iterators.Array;
        addToUnscopables('keys');
        addToUnscopables('values');
        addToUnscopables('entries');
    }, {
        "./_add-to-unscopables": 42,
        "./_iter-define": 78,
        "./_iter-step": 80,
        "./_iterators": 81,
        "./_to-iobject": 117
    }
], 131: [

    function (require, module, exports) {
        'use strict';
        var strong = require('./_collection-strong');
        var validate = require('./_validate-collection');
        var MAP = 'Map';
        // 23.1 Map Objects
        module.exports = require('./_collection')(MAP, function (get) {
            return function Map() {
                return get(this, arguments.length > 0 ? arguments[0] : undefined);
            };
        }, {
            // 23.1.3.6 Map.prototype.get(key)
            get: function get(key) {
                    var entry = strong.getEntry(validate(this, MAP), key);
                    return entry && entry.v;
                },
                // 23.1.3.9 Map.prototype.set(key, value)
                set: function set(key, value) {
                    return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
                }
        }, strong, true);
    }, {
        "./_collection": 54,
        "./_collection-strong": 52,
        "./_validate-collection": 122
    }
], 132: [

    function (require, module, exports) {
        // 19.1.3.1 Object.assign(target, source)
        var $export = require('./_export');
        $export($export.S + $export.F, 'Object', {
            assign: require('./_object-assign')
        });
    }, {
        "./_export": 63,
        "./_object-assign": 87
    }
], 133: [

    function (require, module, exports) {
        var $export = require('./_export');
        // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
        $export($export.S, 'Object', {
            create: require('./_object-create')
        });
    }, {
        "./_export": 63,
        "./_object-create": 88
    }
], 134: [

    function (require, module, exports) {
        var $export = require('./_export');
        // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
        $export($export.S + $export.F * !require('./_descriptors'), 'Object', {
            defineProperty: require('./_object-dp').f
        });
    }, {
        "./_descriptors": 59,
        "./_export": 63,
        "./_object-dp": 89
    }
], 135: [

    function (require, module, exports) {
        // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
        var toIObject = require('./_to-iobject');
        var $getOwnPropertyDescriptor = require('./_object-gopd').f;
        require('./_object-sap')('getOwnPropertyDescriptor', function () {
            return function getOwnPropertyDescriptor(it, key) {
                return $getOwnPropertyDescriptor(toIObject(it), key);
            };
        });
    }, {
        "./_object-gopd": 91,
        "./_object-sap": 99,
        "./_to-iobject": 117
    }
], 136: [

    function (require, module, exports) {
        // 19.1.2.9 Object.getPrototypeOf(O)
        var toObject = require('./_to-object');
        var $getPrototypeOf = require('./_object-gpo');
        require('./_object-sap')('getPrototypeOf', function () {
            return function getPrototypeOf(it) {
                return $getPrototypeOf(toObject(it));
            };
        });
    }, {
        "./_object-gpo": 95,
        "./_object-sap": 99,
        "./_to-object": 119
    }
], 137: [

    function (require, module, exports) {
        // 19.1.2.14 Object.keys(O)
        var toObject = require('./_to-object');
        var $keys = require('./_object-keys');
        require('./_object-sap')('keys', function () {
            return function keys(it) {
                return $keys(toObject(it));
            };
        });
    }, {
        "./_object-keys": 97,
        "./_object-sap": 99,
        "./_to-object": 119
    }
], 138: [

    function (require, module, exports) {
        // 19.1.3.19 Object.setPrototypeOf(O, proto)
        var $export = require('./_export');
        $export($export.S, 'Object', {
            setPrototypeOf: require('./_set-proto').set
        });
    }, {
        "./_export": 63,
        "./_set-proto": 107
    }
], 139: [

    function (require, module, exports) {}, {}
], 140: [

    function (require, module, exports) {
        'use strict';
        var LIBRARY = require('./_library');
        var global = require('./_global');
        var ctx = require('./_ctx');
        var classof = require('./_classof');
        var $export = require('./_export');
        var isObject = require('./_is-object');
        var aFunction = require('./_a-function');
        var anInstance = require('./_an-instance');
        var forOf = require('./_for-of');
        var speciesConstructor = require('./_species-constructor');
        var task = require('./_task').set;
        var microtask = require('./_microtask')();
        var newPromiseCapabilityModule = require('./_new-promise-capability');
        var perform = require('./_perform');
        var promiseResolve = require('./_promise-resolve');
        var PROMISE = 'Promise';
        var TypeError = global.TypeError;
        var process = global.process;
        var $Promise = global[PROMISE];
        var isNode = classof(process) == 'process';
        var empty = function () { /* empty */ };
        var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
        var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
        var USE_NATIVE = !! function () {
            try {
                // correct subclassing with @@species support
                var promise = $Promise.resolve(1);
                var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {
                    exec(empty, empty);
                };
                // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
                return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
            } catch (e) { /* empty */ }
        }();
        // helpers
        var sameConstructor = LIBRARY ? function (a, b) {
            // with library wrapper special case
            return a === b || a === $Promise && b === Wrapper;
        } : function (a, b) {
            return a === b;
        };
        var isThenable = function (it) {
            var then;
            return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
        };
        var notify = function (promise, isReject) {
            if (promise._n) return;
            promise._n = true;
            var chain = promise._c;
            microtask(function () {
                var value = promise._v;
                var ok = promise._s == 1;
                var i = 0;
                var run = function (reaction) {
                    var handler = ok ? reaction.ok : reaction.fail;
                    var resolve = reaction.resolve;
                    var reject = reaction.reject;
                    var domain = reaction.domain;
                    var result, then;
                    try {
                        if (handler) {
                            if (!ok) {
                                if (promise._h == 2) onHandleUnhandled(promise);
                                promise._h = 1;
                            }
                            if (handler === true) result = value;
                            else {
                                if (domain) domain.enter();
                                result = handler(value);
                                if (domain) domain.exit();
                            }
                            if (result === reaction.promise) {
                                reject(TypeError('Promise-chain cycle'));
                            } else if (then = isThenable(result)) {
                                then.call(result, resolve, reject);
                            } else resolve(result);
                        } else reject(value);
                    } catch (e) {
                        reject(e);
                    }
                };
                while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
                promise._c = [];
                promise._n = false;
                if (isReject && !promise._h) onUnhandled(promise);
            });
        };
        var onUnhandled = function (promise) {
            task.call(global, function () {
                var value = promise._v;
                var unhandled = isUnhandled(promise);
                var result, handler, console;
                if (unhandled) {
                    result = perform(function () {
                        if (isNode) {
                            process.emit('unhandledRejection', value, promise);
                        } else if (handler = global.onunhandledrejection) {
                            handler({
                                promise: promise,
                                reason: value
                            });
                        } else if ((console = global.console) && console.error) {
                            console.error('Unhandled promise rejection', value);
                        }
                    });
                    // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
                    promise._h = isNode || isUnhandled(promise) ? 2 : 1;
                }
                promise._a = undefined;
                if (unhandled && result.e) throw result.v;
            });
        };
        var isUnhandled = function (promise) {
            if (promise._h == 1) return false;
            var chain = promise._a || promise._c;
            var i = 0;
            var reaction;
            while (chain.length > i) {
                reaction = chain[i++];
                if (reaction.fail || !isUnhandled(reaction.promise)) return false;
            }
            return true;
        };
        var onHandleUnhandled = function (promise) {
            task.call(global, function () {
                var handler;
                if (isNode) {
                    process.emit('rejectionHandled', promise);
                } else if (handler = global.onrejectionhandled) {
                    handler({
                        promise: promise,
                        reason: promise._v
                    });
                }
            });
        };
        var $reject = function (value) {
            var promise = this;
            if (promise._d) return;
            promise._d = true;
            promise = promise._w || promise; // unwrap
            promise._v = value;
            promise._s = 2;
            if (!promise._a) promise._a = promise._c.slice();
            notify(promise, true);
        };
        var $resolve = function (value) {
            var promise = this;
            var then;
            if (promise._d) return;
            promise._d = true;
            promise = promise._w || promise; // unwrap
            try {
                if (promise === value) throw TypeError("Promise can't be resolved itself");
                if (then = isThenable(value)) {
                    microtask(function () {
                        var wrapper = {
                            _w: promise,
                            _d: false
                        }; // wrap
                        try {
                            then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
                        } catch (e) {
                            $reject.call(wrapper, e);
                        }
                    });
                } else {
                    promise._v = value;
                    promise._s = 1;
                    notify(promise, false);
                }
            } catch (e) {
                $reject.call({
                    _w: promise,
                    _d: false
                }, e); // wrap
            }
        };
        // constructor polyfill
        if (!USE_NATIVE) {
            // 25.4.3.1 Promise(executor)
            $Promise = function Promise(executor) {
                anInstance(this, $Promise, PROMISE, '_h');
                aFunction(executor);
                Internal.call(this);
                try {
                    executor(ctx($resolve, this, 1), ctx($reject, this, 1));
                } catch (err) {
                    $reject.call(this, err);
                }
            };
            // eslint-disable-next-line no-unused-vars
            Internal = function Promise(executor) {
                this._c = []; // <- awaiting reactions
                this._a = undefined; // <- checked in isUnhandled reactions
                this._s = 0; // <- state
                this._d = false; // <- done
                this._v = undefined; // <- value
                this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
                this._n = false; // <- notify
            };
            Internal.prototype = require('./_redefine-all')($Promise.prototype, {
                // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
                then: function then(onFulfilled, onRejected) {
                        var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
                        reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
                        reaction.fail = typeof onRejected == 'function' && onRejected;
                        reaction.domain = isNode ? process.domain : undefined;
                        this._c.push(reaction);
                        if (this._a) this._a.push(reaction);
                        if (this._s) notify(this, false);
                        return reaction.promise;
                    },
                    // 25.4.5.1 Promise.prototype.catch(onRejected)
                    'catch': function (onRejected) {
                        return this.then(undefined, onRejected);
                    }
            });
            OwnPromiseCapability = function () {
                var promise = new Internal();
                this.promise = promise;
                this.resolve = ctx($resolve, promise, 1);
                this.reject = ctx($reject, promise, 1);
            };
            newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
                return sameConstructor($Promise, C) ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C);
            };
        }
        $export($export.G + $export.W + $export.F * !USE_NATIVE, {
            Promise: $Promise
        });
        require('./_set-to-string-tag')($Promise, PROMISE);
        require('./_set-species')(PROMISE);
        Wrapper = require('./_core')[PROMISE];
        // statics
        $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
            // 25.4.4.5 Promise.reject(r)
            reject: function reject(r) {
                var capability = newPromiseCapability(this);
                var $$reject = capability.reject;
                $$reject(r);
                return capability.promise;
            }
        });
        $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
            // 25.4.4.6 Promise.resolve(x)
            resolve: function resolve(x) {
                // instanceof instead of internal slot check because we should fix it without replacement native Promise core
                if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x;
                return promiseResolve(this, x);
            }
        });
        $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) {
            $Promise.all(iter)['catch'](empty);
        })), PROMISE, {
            // 25.4.4.1 Promise.all(iterable)
            all: function all(iterable) {
                    var C = this;
                    var capability = newPromiseCapability(C);
                    var resolve = capability.resolve;
                    var reject = capability.reject;
                    var result = perform(function () {
                        var values = [];
                        var index = 0;
                        var remaining = 1;
                        forOf(iterable, false, function (promise) {
                            var $index = index++;
                            var alreadyCalled = false;
                            values.push(undefined);
                            remaining++;
                            C.resolve(promise).then(function (value) {
                                if (alreadyCalled) return;
                                alreadyCalled = true;
                                values[$index] = value;
                                --remaining || resolve(values);
                            }, reject);
                        });
                        --remaining || resolve(values);
                    });
                    if (result.e) reject(result.v);
                    return capability.promise;
                },
                // 25.4.4.4 Promise.race(iterable)
                race: function race(iterable) {
                    var C = this;
                    var capability = newPromiseCapability(C);
                    var reject = capability.reject;
                    var result = perform(function () {
                        forOf(iterable, false, function (promise) {
                            C.resolve(promise).then(capability.resolve, reject);
                        });
                    });
                    if (result.e) reject(result.v);
                    return capability.promise;
                }
        });
    }, {
        "./_a-function": 41,
        "./_an-instance": 43,
        "./_classof": 50,
        "./_core": 55,
        "./_ctx": 57,
        "./_export": 63,
        "./_for-of": 65,
        "./_global": 66,
        "./_is-object": 75,
        "./_iter-detect": 79,
        "./_library": 83,
        "./_microtask": 85,
        "./_new-promise-capability": 86,
        "./_perform": 100,
        "./_promise-resolve": 101,
        "./_redefine-all": 103,
        "./_set-species": 108,
        "./_set-to-string-tag": 109,
        "./_species-constructor": 112,
        "./_task": 114,
        "./_wks": 125
    }
], 141: [

    function (require, module, exports) {
        'use strict';
        var $at = require('./_string-at')(true);
        // 21.1.3.27 String.prototype[@@iterator]()
        require('./_iter-define')(String, 'String', function (iterated) {
            this._t = String(iterated); // target
            this._i = 0; // next index
            // 21.1.5.2.1 %StringIteratorPrototype%.next()
        }, function () {
            var O = this._t;
            var index = this._i;
            var point;
            if (index >= O.length) return {
                value: undefined,
                done: true
            };
            point = $at(O, index);
            this._i += point.length;
            return {
                value: point,
                done: false
            };
        });
    }, {
        "./_iter-define": 78,
        "./_string-at": 113
    }
], 142: [

    function (require, module, exports) {
        'use strict';
        // ECMAScript 6 symbols shim
        var global = require('./_global');
        var has = require('./_has');
        var DESCRIPTORS = require('./_descriptors');
        var $export = require('./_export');
        var redefine = require('./_redefine');
        var META = require('./_meta').KEY;
        var $fails = require('./_fails');
        var shared = require('./_shared');
        var setToStringTag = require('./_set-to-string-tag');
        var uid = require('./_uid');
        var wks = require('./_wks');
        var wksExt = require('./_wks-ext');
        var wksDefine = require('./_wks-define');
        var keyOf = require('./_keyof');
        var enumKeys = require('./_enum-keys');
        var isArray = require('./_is-array');
        var anObject = require('./_an-object');
        var toIObject = require('./_to-iobject');
        var toPrimitive = require('./_to-primitive');
        var createDesc = require('./_property-desc');
        var _create = require('./_object-create');
        var gOPNExt = require('./_object-gopn-ext');
        var $GOPD = require('./_object-gopd');
        var $DP = require('./_object-dp');
        var $keys = require('./_object-keys');
        var gOPD = $GOPD.f;
        var dP = $DP.f;
        var gOPN = gOPNExt.f;
        var $Symbol = global.Symbol;
        var $JSON = global.JSON;
        var _stringify = $JSON && $JSON.stringify;
        var PROTOTYPE = 'prototype';
        var HIDDEN = wks('_hidden');
        var TO_PRIMITIVE = wks('toPrimitive');
        var isEnum = {}.propertyIsEnumerable;
        var SymbolRegistry = shared('symbol-registry');
        var AllSymbols = shared('symbols');
        var OPSymbols = shared('op-symbols');
        var ObjectProto = Object[PROTOTYPE];
        var USE_NATIVE = typeof $Symbol == 'function';
        var QObject = global.QObject;
        // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
        var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
        // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
        var setSymbolDesc = DESCRIPTORS && $fails(function () {
            return _create(dP({}, 'a', {
                get: function () {
                    return dP(this, 'a', {
                        value: 7
                    }).a;
                }
            })).a != 7;
        }) ? function (it, key, D) {
            var protoDesc = gOPD(ObjectProto, key);
            if (protoDesc) delete ObjectProto[key];
            dP(it, key, D);
            if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
        } : dP;
        var wrap = function (tag) {
            var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
            sym._k = tag;
            return sym;
        };
        var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
            return typeof it == 'symbol';
        } : function (it) {
            return it instanceof $Symbol;
        };
        var $defineProperty = function defineProperty(it, key, D) {
            if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
            anObject(it);
            key = toPrimitive(key, true);
            anObject(D);
            if (has(AllSymbols, key)) {
                if (!D.enumerable) {
                    if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
                    it[HIDDEN][key] = true;
                } else {
                    if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
                    D = _create(D, {
                        enumerable: createDesc(0, false)
                    });
                }
                return setSymbolDesc(it, key, D);
            }
            return dP(it, key, D);
        };
        var $defineProperties = function defineProperties(it, P) {
            anObject(it);
            var keys = enumKeys(P = toIObject(P));
            var i = 0;
            var l = keys.length;
            var key;
            while (l > i) $defineProperty(it, key = keys[i++], P[key]);
            return it;
        };
        var $create = function create(it, P) {
            return P === undefined ? _create(it) : $defineProperties(_create(it), P);
        };
        var $propertyIsEnumerable = function propertyIsEnumerable(key) {
            var E = isEnum.call(this, key = toPrimitive(key, true));
            if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
            return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
        };
        var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
            it = toIObject(it);
            key = toPrimitive(key, true);
            if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
            var D = gOPD(it, key);
            if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
            return D;
        };
        var $getOwnPropertyNames = function getOwnPropertyNames(it) {
            var names = gOPN(toIObject(it));
            var result = [];
            var i = 0;
            var key;
            while (names.length > i) {
                if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
            }
            return result;
        };
        var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
            var IS_OP = it === ObjectProto;
            var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
            var result = [];
            var i = 0;
            var key;
            while (names.length > i) {
                if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
            }
            return result;
        };
        // 19.4.1.1 Symbol([description])
        if (!USE_NATIVE) {
            $Symbol = function Symbol() {
                if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
                var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
                var $set = function (value) {
                    if (this === ObjectProto) $set.call(OPSymbols, value);
                    if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
                    setSymbolDesc(this, tag, createDesc(1, value));
                };
                if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, {
                    configurable: true,
                    set: $set
                });
                return wrap(tag);
            };
            redefine($Symbol[PROTOTYPE], 'toString', function toString() {
                return this._k;
            });
            $GOPD.f = $getOwnPropertyDescriptor;
            $DP.f = $defineProperty;
            require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
            require('./_object-pie').f = $propertyIsEnumerable;
            require('./_object-gops').f = $getOwnPropertySymbols;
            if (DESCRIPTORS && !require('./_library')) {
                redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
            }
            wksExt.f = function (name) {
                return wrap(wks(name));
            };
        }
        $export($export.G + $export.W + $export.F * !USE_NATIVE, {
            Symbol: $Symbol
        });
        for (var es6Symbols = (
            // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
            'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables').split(','), j = 0; es6Symbols.length > j;) wks(es6Symbols[j++]);
        for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
        $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
            // 19.4.2.1 Symbol.for(key)
            'for': function (key) {
                    return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);
                },
                // 19.4.2.5 Symbol.keyFor(sym)
                keyFor: function keyFor(key) {
                    if (isSymbol(key)) return keyOf(SymbolRegistry, key);
                    throw TypeError(key + ' is not a symbol!');
                },
                useSetter: function () {
                    setter = true;
                },
                useSimple: function () {
                    setter = false;
                }
        });
        $export($export.S + $export.F * !USE_NATIVE, 'Object', {
            // 19.1.2.2 Object.create(O [, Properties])
            create: $create,
            // 19.1.2.4 Object.defineProperty(O, P, Attributes)
            defineProperty: $defineProperty,
            // 19.1.2.3 Object.defineProperties(O, Properties)
            defineProperties: $defineProperties,
            // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
            getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
            // 19.1.2.7 Object.getOwnPropertyNames(O)
            getOwnPropertyNames: $getOwnPropertyNames,
            // 19.1.2.8 Object.getOwnPropertySymbols(O)
            getOwnPropertySymbols: $getOwnPropertySymbols
        });
        // 24.3.2 JSON.stringify(value [, replacer [, space]])
        $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
            var S = $Symbol();
            // MS Edge converts symbol values to JSON as {}
            // WebKit converts symbol values to JSON as null
            // V8 throws on boxed symbols
            return _stringify([S]) != '[null]' || _stringify({
                a: S
            }) != '{}' || _stringify(Object(S)) != '{}';
        })), 'JSON', {
            stringify: function stringify(it) {
                if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
                var args = [it];
                var i = 1;
                var replacer, $replacer;
                while (arguments.length > i) args.push(arguments[i++]);
                replacer = args[1];
                if (typeof replacer == 'function') $replacer = replacer;
                if ($replacer || !isArray(replacer)) replacer = function (key, value) {
                    if ($replacer) value = $replacer.call(this, key, value);
                    if (!isSymbol(value)) return value;
                };
                args[1] = replacer;
                return _stringify.apply($JSON, args);
            }
        });
        // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
        $Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
        // 19.4.3.5 Symbol.prototype[@@toStringTag]
        setToStringTag($Symbol, 'Symbol');
        // 20.2.1.9 Math[@@toStringTag]
        setToStringTag(Math, 'Math', true);
        // 24.3.3 JSON[@@toStringTag]
        setToStringTag(global.JSON, 'JSON', true);
    }, {
        "./_an-object": 44,
        "./_descriptors": 59,
        "./_enum-keys": 62,
        "./_export": 63,
        "./_fails": 64,
        "./_global": 66,
        "./_has": 67,
        "./_hide": 68,
        "./_is-array": 74,
        "./_keyof": 82,
        "./_library": 83,
        "./_meta": 84,
        "./_object-create": 88,
        "./_object-dp": 89,
        "./_object-gopd": 91,
        "./_object-gopn": 93,
        "./_object-gopn-ext": 92,
        "./_object-gops": 94,
        "./_object-keys": 97,
        "./_object-pie": 98,
        "./_property-desc": 102,
        "./_redefine": 104,
        "./_set-to-string-tag": 109,
        "./_shared": 111,
        "./_to-iobject": 117,
        "./_to-primitive": 120,
        "./_uid": 121,
        "./_wks": 125,
        "./_wks-define": 123,
        "./_wks-ext": 124
    }
], 143: [

    function (require, module, exports) {
        // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
        require('./_set-collection-from')('Map');
    }, {
        "./_set-collection-from": 105
    }
], 144: [

    function (require, module, exports) {
        // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
        require('./_set-collection-of')('Map');
    }, {
        "./_set-collection-of": 106
    }
], 145: [

    function (require, module, exports) {
        // https://github.com/DavidBruant/Map-Set.prototype.toJSON
        var $export = require('./_export');
        $export($export.P + $export.R, 'Map', {
            toJSON: require('./_collection-to-json')('Map')
        });
    }, {
        "./_collection-to-json": 53,
        "./_export": 63
    }
], 146: [

    function (require, module, exports) {
        // https://github.com/tc39/proposal-promise-finally
        'use strict';
        var $export = require('./_export');
        var core = require('./_core');
        var global = require('./_global');
        var speciesConstructor = require('./_species-constructor');
        var promiseResolve = require('./_promise-resolve');
        $export($export.P + $export.R, 'Promise', {
            'finally': function (onFinally) {
                var C = speciesConstructor(this, core.Promise || global.Promise);
                var isFunction = typeof onFinally == 'function';
                return this.then(isFunction ? function (x) {
                    return promiseResolve(C, onFinally()).then(function () {
                        return x;
                    });
                } : onFinally, isFunction ? function (e) {
                    return promiseResolve(C, onFinally()).then(function () {
                        throw e;
                    });
                } : onFinally);
            }
        });
    }, {
        "./_core": 55,
        "./_export": 63,
        "./_global": 66,
        "./_promise-resolve": 101,
        "./_species-constructor": 112
    }
], 147: [

    function (require, module, exports) {
        'use strict';
        // https://github.com/tc39/proposal-promise-try
        var $export = require('./_export');
        var newPromiseCapability = require('./_new-promise-capability');
        var perform = require('./_perform');
        $export($export.S, 'Promise', {
            'try': function (callbackfn) {
                var promiseCapability = newPromiseCapability.f(this);
                var result = perform(callbackfn);
                (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
                return promiseCapability.promise;
            }
        });
    }, {
        "./_export": 63,
        "./_new-promise-capability": 86,
        "./_perform": 100
    }
], 148: [

    function (require, module, exports) {
        require('./_wks-define')('asyncIterator');
    }, {
        "./_wks-define": 123
    }
], 149: [

    function (require, module, exports) {
        require('./_wks-define')('observable');
    }, {
        "./_wks-define": 123
    }
], 150: [

    function (require, module, exports) {
        require('./es6.array.iterator');
        var global = require('./_global');
        var hide = require('./_hide');
        var Iterators = require('./_iterators');
        var TO_STRING_TAG = require('./_wks')('toStringTag');
        var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(',');
        for (var i = 0; i < DOMIterables.length; i++) {
            var NAME = DOMIterables[i];
            var Collection = global[NAME];
            var proto = Collection && Collection.prototype;
            if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
            Iterators[NAME] = Iterators.Array;
        }
    }, {
        "./_global": 66,
        "./_hide": 68,
        "./_iterators": 81,
        "./_wks": 125,
        "./es6.array.iterator": 130
    }
], 151: [

    function (require, module, exports) {
        /*!
         * mi18n - https://github.com/Draggable/mi18n
         * Version: 0.3.4
         * Author: Kevin Chappell <kevin.b.chappell@gmail.com> (http://kevin-chappell.com)
         */
        module.exports = function (t) {
            function e(r) {
                if (n[r]) return n[r].exports;
                var o = n[r] = {
                    i: r,
                    l: !1,
                    exports: {}
                };
                return t[r].call(o.exports, o, o.exports, e), o.l = !0, o.exports
            }
            var n = {};
            return e.m = t, e.c = n, e.i = function (t) {
                return t
            }, e.d = function (t, n, r) {
                e.o(t, n) || Object.defineProperty(t, n, {
                    configurable: !1,
                    enumerable: !0,
                    get: r
                })
            }, e.n = function (t) {
                var n = t && t.__esModule ? function () {
                    return t.default
                } : function () {
                    return t
                };
                return e.d(n, "a", n), n
            }, e.o = function (t, e) {
                return Object.prototype.hasOwnProperty.call(t, e)
            }, e.p = "", e(e.s = 0)
        }([

            function (t, e) {
                "use strict";

                function n(t) {
                    return function () {
                        var e = t.apply(this, arguments);
                        return new Promise(function (t, n) {
                            function r(o, u) {
                                try {
                                    var i = e[o](u),
                                        a = i.value
                                } catch (t) {
                                    return void n(t)
                                }
                                return i.done ? void t(a) : Promise.resolve(a).then(function (t) {
                                    r("next", t)
                                }, function (t) {
                                    r("throw", t)
                                })
                            }
                            return r("next")
                        })
                    }
                }

                function r(t, e) {
                    if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
                }
                Object.defineProperty(e, "__esModule", {
                    value: !0
                });
                var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
                        return typeof t
                    } : function (t) {
                        return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
                    },
                    u = function () {
                        function t(t, e) {
                            for (var n, r = 0; r < e.length; r++) n = e[r], n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
                        }
                        return function (e, n, r) {
                            return n && t(e.prototype, n), r && t(e, r), e
                        }
                    }(),
                    i = function () {
                        function t() {
                            var e = this;
                            r(this, t);
                            var n = {
                                extension: ".lang",
                                location: "assets/lang/",
                                langs: ["zh-CN"],
                                locale: "zh-CN",
                                preloaded: {}
                            };
                            this.init = function (t) {
                                return e.config = Object.assign({}, n, t), e.langs = Object.assign({}, e.config.preloaded), e.locale = e.config.locale || e.config.langs[0], e.setCurrent(e.locale)
                            }
                        }
                        return t.prototype.getValue = function (t) {
                            return this.current && this.current[t] || t
                        }, t.prototype.makeSafe = function (t) {
                            var e = {
                                "{": "\\{",
                                "}": "\\}",
                                "|": "\\|"
                            };
                            return t = t.replace(/\{|\}|\|/g, function (t) {
                                return e[t]
                            }), new RegExp(t, "g")
                        }, t.prototype.put = function (t, e) {
                            return this.current[t] = e
                        }, t.prototype.get = function (t, e) {
                            var n, r = this,
                                u = this.getValue(t),
                                i = u.match(/\{[^\}]+?\}/g);
                            if (e && i)
                                if ("object" === (void 0 === e ? "undefined" : o(e)))
                                    for (var a = 0; a < i.length; a++) n = i[a].substring(1, i[a].length - 1), u = u.replace(r.makeSafe(i[a]), e[n] || "");
                                else u = u.replace(/\{[^\}]+?\}/g, e);
                            return u
                        }, t.prototype.fromFile = function (t) {
                            for (var e, n = t.split("\n"), r = {}, o = 0; o < n.length; o++)
                                if (e = n[o].match(/^(.+?) *?= *?([^\n]+)/)) {
                                    var u = e[2].replace(/^\s+|\s+$/, "");
                                    r[e[1]] = u
                                }
                            return r
                        }, t.prototype.processFile = function (t) {
                            var e = t.replace(/\n\n/g, "\n");
                            return this.fromFile(e)
                        }, t.prototype.loadLang = function (t) {
                            var e = this;
                            return new Promise(function (n, r) {
                                if (e.langs[t]) n(e.langs[t]);
                                else {
                                    var o = new XMLHttpRequest,
                                        u = e.config.location + t + e.config.extension;
                                    o.open("GET", u, !0), o.onload = function () {
                                        if (304 >= this.status) {
                                            var u = e.processFile(o.responseText);
                                            e.langs[t] = u, n(u)
                                        } else r({
                                            status: this.status,
                                            statusText: o.statusText
                                        })
                                    }, o.onerror = function () {
                                        r({
                                            status: this.status,
                                            statusText: o.statusText
                                        })
                                    }, o.send()
                                }
                            })
                        }, t.prototype.setCurrent = function () {
                            var t = n(regeneratorRuntime.mark(function t() {
                                var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "zh-CN";
                                return regeneratorRuntime.wrap(function (t) {
                                    for (;;) switch (t.prev = t.next) {
                                    case 0:
                                        return t.next = 2, this.loadLang(e);
                                    case 2:
                                        return this.locale = e, this.current = this.langs[e], t.abrupt("return", this.current);
                                    case 5:
                                    case "end":
                                        return t.stop()
                                    }
                                }, t, this)
                            }));
                            return function () {
                                return t.apply(this, arguments)
                            }
                        }(), u(t, [{
                            key: "getLangs",
                            get: function () {
                                return this.config.langs
                            }
                        }]), t
                    }();
                e.default = new i
            }
        ]);
    }, {}
], 152: [

    function (require, module, exports) {
        // shim for using process in browser
        var process = module.exports = {};
        // cached from whatever global is present so that test runners that stub it
        // don't break things.  But we need to wrap it in a try catch in case it is
        // wrapped in strict mode code which doesn't define any globals.  It's inside a
        // function because try/catches deoptimize in certain engines.
        var cachedSetTimeout;
        var cachedClearTimeout;

        function defaultSetTimout() {
            throw new Error('setTimeout has not been defined');
        }

        function defaultClearTimeout() {
                throw new Error('clearTimeout has not been defined');
            }
            (function () {
                try {
                    if (typeof setTimeout === 'function') {
                        cachedSetTimeout = setTimeout;
                    } else {
                        cachedSetTimeout = defaultSetTimout;
                    }
                } catch (e) {
                    cachedSetTimeout = defaultSetTimout;
                }
                try {
                    if (typeof clearTimeout === 'function') {
                        cachedClearTimeout = clearTimeout;
                    } else {
                        cachedClearTimeout = defaultClearTimeout;
                    }
                } catch (e) {
                    cachedClearTimeout = defaultClearTimeout;
                }
            }())

        function runTimeout(fun) {
            if (cachedSetTimeout === setTimeout) {
                //normal enviroments in sane situations
                return setTimeout(fun, 0);
            }
            // if setTimeout wasn't available but was latter defined
            if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
                cachedSetTimeout = setTimeout;
                return setTimeout(fun, 0);
            }
            try {
                // when when somebody has screwed with setTimeout but no I.E. maddness
                return cachedSetTimeout(fun, 0);
            } catch (e) {
                try {
                    // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
                    return cachedSetTimeout.call(null, fun, 0);
                } catch (e) {
                    // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
                    return cachedSetTimeout.call(this, fun, 0);
                }
            }
        }

        function runClearTimeout(marker) {
            if (cachedClearTimeout === clearTimeout) {
                //normal enviroments in sane situations
                return clearTimeout(marker);
            }
            // if clearTimeout wasn't available but was latter defined
            if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
                cachedClearTimeout = clearTimeout;
                return clearTimeout(marker);
            }
            try {
                // when when somebody has screwed with setTimeout but no I.E. maddness
                return cachedClearTimeout(marker);
            } catch (e) {
                try {
                    // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
                    return cachedClearTimeout.call(null, marker);
                } catch (e) {
                    // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
                    // Some versions of I.E. have different rules for clearTimeout vs setTimeout
                    return cachedClearTimeout.call(this, marker);
                }
            }
        }
        var queue = [];
        var draining = false;
        var currentQueue;
        var queueIndex = -1;

        function cleanUpNextTick() {
            if (!draining || !currentQueue) {
                return;
            }
            draining = false;
            if (currentQueue.length) {
                queue = currentQueue.concat(queue);
            } else {
                queueIndex = -1;
            }
            if (queue.length) {
                drainQueue();
            }
        }

        function drainQueue() {
            if (draining) {
                return;
            }
            var timeout = runTimeout(cleanUpNextTick);
            draining = true;
            var len = queue.length;
            while (len) {
                currentQueue = queue;
                queue = [];
                while (++queueIndex < len) {
                    if (currentQueue) {
                        currentQueue[queueIndex].run();
                    }
                }
                queueIndex = -1;
                len = queue.length;
            }
            currentQueue = null;
            draining = false;
            runClearTimeout(timeout);
        }
        process.nextTick = function (fun) {
            var args = new Array(arguments.length - 1);
            if (arguments.length > 1) {
                for (var i = 1; i < arguments.length; i++) {
                    args[i - 1] = arguments[i];
                }
            }
            queue.push(new Item(fun, args));
            if (queue.length === 1 && !draining) {
                runTimeout(drainQueue);
            }
        };
        // v8 likes predictible objects
        function Item(fun, array) {
            this.fun = fun;
            this.array = array;
        }
        Item.prototype.run = function () {
            this.fun.apply(null, this.array);
        };
        process.title = 'browser';
        process.browser = true;
        process.env = {};
        process.argv = [];
        process.version = ''; // empty string to avoid regexp issues
        process.versions = {};

        function noop() {}
        process.on = noop;
        process.addListener = noop;
        process.once = noop;
        process.off = noop;
        process.removeListener = noop;
        process.removeAllListeners = noop;
        process.emit = noop;
        process.prependListener = noop;
        process.prependOnceListener = noop;
        process.listeners = function (name) {
            return []
        }
        process.binding = function (name) {
            throw new Error('process.binding is not supported');
        };
        process.cwd = function () {
            return '/'
        };
        process.chdir = function (dir) {
            throw new Error('process.chdir is not supported');
        };
        process.umask = function () {
            return 0;
        };
    }, {}
], 153: [

    function (require, module, exports) {
        // This method of obtaining a reference to the global object needs to be
        // kept identical to the way it is obtained in runtime.js
        var g = (function () {
            return this
        })() || Function("return this")();
        // Use `getOwnPropertyNames` because not all browsers support calling
        // `hasOwnProperty` on the global `self` object in a worker. See #183.
        var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
        // Save the old regeneratorRuntime in case it needs to be restored later.
        var oldRuntime = hadRuntime && g.regeneratorRuntime;
        // Force reevalutation of runtime.js.
        g.regeneratorRuntime = undefined;
        module.exports = require("./runtime");
        if (hadRuntime) {
            // Restore the original runtime.
            g.regeneratorRuntime = oldRuntime;
        } else {
            // Remove the global property added by runtime.js.
            try {
                delete g.regeneratorRuntime;
            } catch (e) {
                g.regeneratorRuntime = undefined;
            }
        }
    }, {
        "./runtime": 154
    }
], 154: [

    function (require, module, exports) {
        /**
         * Copyright (c) 2014, Facebook, Inc.
         * All rights reserved.
         *
         * This source code is licensed under the BSD-style license found in the
         * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
         * additional grant of patent rights can be found in the PATENTS file in
         * the same directory.
         */
        !(function (global) {
            "use strict";
            var Op = Object.prototype;
            var hasOwn = Op.hasOwnProperty;
            var undefined; // More compressible than void 0.
            var $Symbol = typeof Symbol === "function" ? Symbol : {};
            var iteratorSymbol = $Symbol.iterator || "@@iterator";
            var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
            var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
            var inModule = typeof module === "object";
            var runtime = global.regeneratorRuntime;
            if (runtime) {
                if (inModule) {
                    // If regeneratorRuntime is defined globally and we're in a module,
                    // make the exports object identical to regeneratorRuntime.
                    module.exports = runtime;
                }
                // Don't bother evaluating the rest of this file if the runtime was
                // already defined globally.
                return;
            }
            // Define the runtime globally (as expected by generated code) as either
            // module.exports (if we're in a module) or a new, empty object.
            runtime = global.regeneratorRuntime = inModule ? module.exports : {};

            function wrap(innerFn, outerFn, self, tryLocsList) {
                // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
                var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
                var generator = Object.create(protoGenerator.prototype);
                var context = new Context(tryLocsList || []);
                // The ._invoke method unifies the implementations of the .next,
                // .throw, and .return methods.
                generator._invoke = makeInvokeMethod(innerFn, self, context);
                return generator;
            }
            runtime.wrap = wrap;
            // Try/catch helper to minimize deoptimizations. Returns a completion
            // record like context.tryEntries[i].completion. This interface could
            // have been (and was previously) designed to take a closure to be
            // invoked without arguments, but in all the cases we care about we
            // already have an existing method we want to call, so there's no need
            // to create a new function object. We can even get away with assuming
            // the method takes exactly one argument, since that happens to be true
            // in every case, so we don't have to touch the arguments object. The
            // only additional allocation required is the completion record, which
            // has a stable shape and so hopefully should be cheap to allocate.
            function tryCatch(fn, obj, arg) {
                try {
                    return {
                        type: "normal",
                        arg: fn.call(obj, arg)
                    };
                } catch (err) {
                    return {
                        type: "throw",
                        arg: err
                    };
                }
            }
            var GenStateSuspendedStart = "suspendedStart";
            var GenStateSuspendedYield = "suspendedYield";
            var GenStateExecuting = "executing";
            var GenStateCompleted = "completed";
            // Returning this object from the innerFn has the same effect as
            // breaking out of the dispatch switch statement.
            var ContinueSentinel = {};
            // Dummy constructor functions that we use as the .constructor and
            // .constructor.prototype properties for functions that return Generator
            // objects. For full spec compliance, you may wish to configure your
            // minifier not to mangle the names of these two functions.
            function Generator() {}

            function GeneratorFunction() {}

            function GeneratorFunctionPrototype() {}
                // This is a polyfill for %IteratorPrototype% for environments that
                // don't natively support it.
            var IteratorPrototype = {};
            IteratorPrototype[iteratorSymbol] = function () {
                return this;
            };
            var getProto = Object.getPrototypeOf;
            var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
            if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
                // This environment has a native %IteratorPrototype%; use it instead
                // of the polyfill.
                IteratorPrototype = NativeIteratorPrototype;
            }
            var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
            GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
            GeneratorFunctionPrototype.constructor = GeneratorFunction;
            GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
            // Helper for defining the .next, .throw, and .return methods of the
            // Iterator interface in terms of a single ._invoke method.
            function defineIteratorMethods(prototype) {
                ["next", "throw", "return"].forEach(function (method) {
                    prototype[method] = function (arg) {
                        return this._invoke(method, arg);
                    };
                });
            }
            runtime.isGeneratorFunction = function (genFun) {
                var ctor = typeof genFun === "function" && genFun.constructor;
                return ctor ? ctor === GeneratorFunction ||
                    // For the native GeneratorFunction constructor, the best we can
                    // do is to check its .name property.
                    (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
            };
            runtime.mark = function (genFun) {
                if (Object.setPrototypeOf) {
                    Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
                } else {
                    genFun.__proto__ = GeneratorFunctionPrototype;
                    if (!(toStringTagSymbol in genFun)) {
                        genFun[toStringTagSymbol] = "GeneratorFunction";
                    }
                }
                genFun.prototype = Object.create(Gp);
                return genFun;
            };
            // Within the body of any async function, `await x` is transformed to
            // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
            // `hasOwn.call(value, "__await")` to determine if the yielded value is
            // meant to be awaited.
            runtime.awrap = function (arg) {
                return {
                    __await: arg
                };
            };

            function AsyncIterator(generator) {
                function invoke(method, arg, resolve, reject) {
                    var record = tryCatch(generator[method], generator, arg);
                    if (record.type === "throw") {
                        reject(record.arg);
                    } else {
                        var result = record.arg;
                        var value = result.value;
                        if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
                            return Promise.resolve(value.__await).then(function (value) {
                                invoke("next", value, resolve, reject);
                            }, function (err) {
                                invoke("throw", err, resolve, reject);
                            });
                        }
                        return Promise.resolve(value).then(function (unwrapped) {
                            // When a yielded Promise is resolved, its final value becomes
                            // the .value of the Promise<{value,done}> result for the
                            // current iteration. If the Promise is rejected, however, the
                            // result for this iteration will be rejected with the same
                            // reason. Note that rejections of yielded Promises are not
                            // thrown back into the generator function, as is the case
                            // when an awaited Promise is rejected. This difference in
                            // behavior between yield and await is important, because it
                            // allows the consumer to decide what to do with the yielded
                            // rejection (swallow it and continue, manually .throw it back
                            // into the generator, abandon iteration, whatever). With
                            // await, by contrast, there is no opportunity to examine the
                            // rejection reason outside the generator function, so the
                            // only option is to throw it from the await expression, and
                            // let the generator function handle the exception.
                            result.value = unwrapped;
                            resolve(result);
                        }, reject);
                    }
                }
                var previousPromise;

                function enqueue(method, arg) {
                        function callInvokeWithMethodAndArg() {
                            return new Promise(function (resolve, reject) {
                                invoke(method, arg, resolve, reject);
                            });
                        }
                        return previousPromise =
                            // If enqueue has been called before, then we want to wait until
                            // all previous Promises have been resolved before calling invoke,
                            // so that results are always delivered in the correct order. If
                            // enqueue has not been called before, then it is important to
                            // call invoke immediately, without waiting on a callback to fire,
                            // so that the async generator function has the opportunity to do
                            // any necessary setup in a predictable way. This predictability
                            // is why the Promise constructor synchronously invokes its
                            // executor callback, and why async functions synchronously
                            // execute code before the first await. Since we implement simple
                            // async functions in terms of async generators, it is especially
                            // important to get this right, even though it requires care.
                            previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
                                // Avoid propagating failures to Promises returned by later
                                // invocations of the iterator.
                                callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
                    }
                    // Define the unified helper method that is used to implement .next,
                    // .throw, and .return (see defineIteratorMethods).
                this._invoke = enqueue;
            }
            defineIteratorMethods(AsyncIterator.prototype);
            AsyncIterator.prototype[asyncIteratorSymbol] = function () {
                return this;
            };
            runtime.AsyncIterator = AsyncIterator;
            // Note that simple async functions are implemented on top of
            // AsyncIterator objects; they just return a Promise for the value of
            // the final result produced by the iterator.
            runtime.async = function (innerFn, outerFn, self, tryLocsList) {
                var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
                return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
                    : iter.next().then(function (result) {
                        return result.done ? result.value : iter.next();
                    });
            };

            function makeInvokeMethod(innerFn, self, context) {
                    var state = GenStateSuspendedStart;
                    return function invoke(method, arg) {
                        if (state === GenStateExecuting) {
                            throw new Error("Generator is already running");
                        }
                        if (state === GenStateCompleted) {
                            if (method === "throw") {
                                throw arg;
                            }
                            // Be forgiving, per 25.3.3.3.3 of the spec:
                            // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
                            return doneResult();
                        }
                        context.method = method;
                        context.arg = arg;
                        while (true) {
                            var delegate = context.delegate;
                            if (delegate) {
                                var delegateResult = maybeInvokeDelegate(delegate, context);
                                if (delegateResult) {
                                    if (delegateResult === ContinueSentinel) continue;
                                    return delegateResult;
                                }
                            }
                            if (context.method === "next") {
                                // Setting context._sent for legacy support of Babel's
                                // function.sent implementation.
                                context.sent = context._sent = context.arg;
                            } else if (context.method === "throw") {
                                if (state === GenStateSuspendedStart) {
                                    state = GenStateCompleted;
                                    throw context.arg;
                                }
                                context.dispatchException(context.arg);
                            } else if (context.method === "return") {
                                context.abrupt("return", context.arg);
                            }
                            state = GenStateExecuting;
                            var record = tryCatch(innerFn, self, context);
                            if (record.type === "normal") {
                                // If an exception is thrown from innerFn, we leave state ===
                                // GenStateExecuting and loop back for another invocation.
                                state = context.done ? GenStateCompleted : GenStateSuspendedYield;
                                if (record.arg === ContinueSentinel) {
                                    continue;
                                }
                                return {
                                    value: record.arg,
                                    done: context.done
                                };
                            } else if (record.type === "throw") {
                                state = GenStateCompleted;
                                // Dispatch the exception by looping back around to the
                                // context.dispatchException(context.arg) call above.
                                context.method = "throw";
                                context.arg = record.arg;
                            }
                        }
                    };
                }
                // Call delegate.iterator[context.method](context.arg) and handle the
                // result, either by returning a { value, done } result from the
                // delegate iterator, or by modifying context.method and context.arg,
                // setting context.delegate to null, and returning the ContinueSentinel.

            function maybeInvokeDelegate(delegate, context) {
                    var method = delegate.iterator[context.method];
                    if (method === undefined) {
                        // A .throw or .return when the delegate iterator has no .throw
                        // method always terminates the yield* loop.
                        context.delegate = null;
                        if (context.method === "throw") {
                            if (delegate.iterator.return) {
                                // If the delegate iterator has a return method, give it a
                                // chance to clean up.
                                context.method = "return";
                                context.arg = undefined;
                                maybeInvokeDelegate(delegate, context);
                                if (context.method === "throw") {
                                    // If maybeInvokeDelegate(context) changed context.method from
                                    // "return" to "throw", let that override the TypeError below.
                                    return ContinueSentinel;
                                }
                            }
                            context.method = "throw";
                            context.arg = new TypeError("The iterator does not provide a 'throw' method");
                        }
                        return ContinueSentinel;
                    }
                    var record = tryCatch(method, delegate.iterator, context.arg);
                    if (record.type === "throw") {
                        context.method = "throw";
                        context.arg = record.arg;
                        context.delegate = null;
                        return ContinueSentinel;
                    }
                    var info = record.arg;
                    if (!info) {
                        context.method = "throw";
                        context.arg = new TypeError("iterator result is not an object");
                        context.delegate = null;
                        return ContinueSentinel;
                    }
                    if (info.done) {
                        // Assign the result of the finished delegate to the temporary
                        // variable specified by delegate.resultName (see delegateYield).
                        context[delegate.resultName] = info.value;
                        // Resume execution at the desired location (see delegateYield).
                        context.next = delegate.nextLoc;
                        // If context.method was "throw" but the delegate handled the
                        // exception, let the outer generator proceed normally. If
                        // context.method was "next", forget context.arg since it has been
                        // "consumed" by the delegate iterator. If context.method was
                        // "return", allow the original .return call to continue in the
                        // outer generator.
                        if (context.method !== "return") {
                            context.method = "next";
                            context.arg = undefined;
                        }
                    } else {
                        // Re-yield the result returned by the delegate method.
                        return info;
                    }
                    // The delegate iterator is finished, so forget it and continue with
                    // the outer generator.
                    context.delegate = null;
                    return ContinueSentinel;
                }
                // Define Generator.prototype.{next,throw,return} in terms of the
                // unified ._invoke helper method.
            defineIteratorMethods(Gp);
            Gp[toStringTagSymbol] = "Generator";
            // A Generator should always return itself as the iterator object when the
            // @@iterator function is called on it. Some browsers' implementations of the
            // iterator prototype chain incorrectly implement this, causing the Generator
            // object to not be returned from this call. This ensures that doesn't happen.
            // See https://github.com/facebook/regenerator/issues/274 for more details.
            Gp[iteratorSymbol] = function () {
                return this;
            };
            Gp.toString = function () {
                return "[object Generator]";
            };

            function pushTryEntry(locs) {
                var entry = {
                    tryLoc: locs[0]
                };
                if (1 in locs) {
                    entry.catchLoc = locs[1];
                }
                if (2 in locs) {
                    entry.finallyLoc = locs[2];
                    entry.afterLoc = locs[3];
                }
                this.tryEntries.push(entry);
            }

            function resetTryEntry(entry) {
                var record = entry.completion || {};
                record.type = "normal";
                delete record.arg;
                entry.completion = record;
            }

            function Context(tryLocsList) {
                // The root entry object (effectively a try statement without a catch
                // or a finally block) gives us a place to store values thrown from
                // locations where there is no enclosing try statement.
                this.tryEntries = [{
                    tryLoc: "root"
                }];
                tryLocsList.forEach(pushTryEntry, this);
                this.reset(true);
            }
            runtime.keys = function (object) {
                var keys = [];
                for (var key in object) {
                    keys.push(key);
                }
                keys.reverse();
                // Rather than returning an object with a next method, we keep
                // things simple and return the next function itself.
                return function next() {
                    while (keys.length) {
                        var key = keys.pop();
                        if (key in object) {
                            next.value = key;
                            next.done = false;
                            return next;
                        }
                    }
                    // To avoid creating an additional object, we just hang the .value
                    // and .done properties off the next function object itself. This
                    // also ensures that the minifier will not anonymize the function.
                    next.done = true;
                    return next;
                };
            };

            function values(iterable) {
                if (iterable) {
                    var iteratorMethod = iterable[iteratorSymbol];
                    if (iteratorMethod) {
                        return iteratorMethod.call(iterable);
                    }
                    if (typeof iterable.next === "function") {
                        return iterable;
                    }
                    if (!isNaN(iterable.length)) {
                        var i = -1,
                            next = function next() {
                                while (++i < iterable.length) {
                                    if (hasOwn.call(iterable, i)) {
                                        next.value = iterable[i];
                                        next.done = false;
                                        return next;
                                    }
                                }
                                next.value = undefined;
                                next.done = true;
                                return next;
                            };
                        return next.next = next;
                    }
                }
                // Return an iterator with no values.
                return {
                    next: doneResult
                };
            }
            runtime.values = values;

            function doneResult() {
                return {
                    value: undefined,
                    done: true
                };
            }
            Context.prototype = {
                constructor: Context,
                reset: function (skipTempReset) {
                        this.prev = 0;
                        this.next = 0;
                        // Resetting context._sent for legacy support of Babel's
                        // function.sent implementation.
                        this.sent = this._sent = undefined;
                        this.done = false;
                        this.delegate = null;
                        this.method = "next";
                        this.arg = undefined;
                        this.tryEntries.forEach(resetTryEntry);
                        if (!skipTempReset) {
                            for (var name in this) {
                                // Not sure about the optimal order of these conditions:
                                if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
                                    this[name] = undefined;
                                }
                            }
                        }
                    },
                    stop: function () {
                        this.done = true;
                        var rootEntry = this.tryEntries[0];
                        var rootRecord = rootEntry.completion;
                        if (rootRecord.type === "throw") {
                            throw rootRecord.arg;
                        }
                        return this.rval;
                    },
                    dispatchException: function (exception) {
                        if (this.done) {
                            throw exception;
                        }
                        var context = this;

                        function handle(loc, caught) {
                            record.type = "throw";
                            record.arg = exception;
                            context.next = loc;
                            if (caught) {
                                // If the dispatched exception was caught by a catch block,
                                // then let that catch block handle the exception normally.
                                context.method = "next";
                                context.arg = undefined;
                            }
                            return !!caught;
                        }
                        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                            var entry = this.tryEntries[i];
                            var record = entry.completion;
                            if (entry.tryLoc === "root") {
                                // Exception thrown outside of any try block that could handle
                                // it, so set the completion value of the entire function to
                                // throw the exception.
                                return handle("end");
                            }
                            if (entry.tryLoc <= this.prev) {
                                var hasCatch = hasOwn.call(entry, "catchLoc");
                                var hasFinally = hasOwn.call(entry, "finallyLoc");
                                if (hasCatch && hasFinally) {
                                    if (this.prev < entry.catchLoc) {
                                        return handle(entry.catchLoc, true);
                                    } else if (this.prev < entry.finallyLoc) {
                                        return handle(entry.finallyLoc);
                                    }
                                } else if (hasCatch) {
                                    if (this.prev < entry.catchLoc) {
                                        return handle(entry.catchLoc, true);
                                    }
                                } else if (hasFinally) {
                                    if (this.prev < entry.finallyLoc) {
                                        return handle(entry.finallyLoc);
                                    }
                                } else {
                                    throw new Error("try statement without catch or finally");
                                }
                            }
                        }
                    },
                    abrupt: function (type, arg) {
                        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                            var entry = this.tryEntries[i];
                            if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
                                var finallyEntry = entry;
                                break;
                            }
                        }
                        if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
                            // Ignore the finally entry if control is not jumping to a
                            // location outside the try/catch block.
                            finallyEntry = null;
                        }
                        var record = finallyEntry ? finallyEntry.completion : {};
                        record.type = type;
                        record.arg = arg;
                        if (finallyEntry) {
                            this.method = "next";
                            this.next = finallyEntry.finallyLoc;
                            return ContinueSentinel;
                        }
                        return this.complete(record);
                    },
                    complete: function (record, afterLoc) {
                        if (record.type === "throw") {
                            throw record.arg;
                        }
                        if (record.type === "break" || record.type === "continue") {
                            this.next = record.arg;
                        } else if (record.type === "return") {
                            this.rval = this.arg = record.arg;
                            this.method = "return";
                            this.next = "end";
                        } else if (record.type === "normal" && afterLoc) {
                            this.next = afterLoc;
                        }
                        return ContinueSentinel;
                    },
                    finish: function (finallyLoc) {
                        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                            var entry = this.tryEntries[i];
                            if (entry.finallyLoc === finallyLoc) {
                                this.complete(entry.completion, entry.afterLoc);
                                resetTryEntry(entry);
                                return ContinueSentinel;
                            }
                        }
                    }, "catch": function (tryLoc) {
                        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                            var entry = this.tryEntries[i];
                            if (entry.tryLoc === tryLoc) {
                                var record = entry.completion;
                                if (record.type === "throw") {
                                    var thrown = record.arg;
                                    resetTryEntry(entry);
                                }
                                return thrown;
                            }
                        }
                        // The context.catch method must only be called with a location
                        // argument that corresponds to a known catch block.
                        throw new Error("illegal catch attempt");
                    },
                    delegateYield: function (iterable, resultName, nextLoc) {
                        this.delegate = {
                            iterator: values(iterable),
                            resultName: resultName,
                            nextLoc: nextLoc
                        };
                        if (this.method === "next") {
                            // Deliberately forget the last sent value so that we don't
                            // accidentally pass it on to the delegate.
                            this.arg = undefined;
                        }
                        return ContinueSentinel;
                    }
            };
        })(
            // In sloppy mode, unbound `this` refers to the global object, fallback to
            // Function constructor if we're in global strict mode. That is sadly a form
            // of indirect eval which violates Content Security Policy.
            (function () {
                return this
            })() || Function("return this")());
    }, {}
], 155: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var defaultOptions = exports.defaultOptions = {
            controlPosition: 'left',
            append: false,
            actionButtons: [],
            controlOrder: ['autocomplete', 'button', 'checkbox', 'checkbox-group', 'date', 'file', 'header', 'hidden', 'paragraph', 'number', 'radio-group', 'select', 'text', 'textarea'],
            dataType: 'json',
            disableFields: [],
            disabledAttrs: [],
            disabledActionButtons: [],
            disabledFieldButtons: {},
            editOnAdd: false,
            defaultFields: [],
            fields: [],
            fieldRemoveWarn: false,
            inputSets: [],
            replaceFields: [],
            roles: {
                1: 'Administrator'
            },
            notify: {
                error: function error(message) {
                    return console.error(message);
                },
                success: function success(message) {
                    return console.log(message);
                },
                warning: function warning(message) {
                    return console.warn(message);
                }
            },
            onSave: function onSave(evt, formData) {
                return null;
            },
            onClearAll: function onClearAll() {
                return null;
            },
            prepend: false,
            sortableControls: false,
            stickyControls: {
                enable: true,
                offset: {
                    top: 5,
                    bottom: 'auto',
                    right: 'auto'
                }
            },
            templates: {},
            showActionButtons: true,
            typeUserDisabledAttrs: {},
            typeUserAttrs: {},
            typeUserEvents: {},
            prefix: 'form-builder-'
        };
        var styles = exports.styles = {
            btn: ['default', 'danger', 'info', 'primary', 'success', 'warning']
        };
        var defaultI18n = exports.defaultI18n = {
            location: 'https://formbuilder.online/assets/lang/',
            langs: ['zh-CN'],
            preloaded: {
                'zh-CN': {
                    'addOption' : '新增选项',
                    'allFieldsRemoved' : '所有字段已删除',
                    'allowSelect' : '允许选择',
                    'autocomplete' : '自动完成',
                    'button' : '按钮',
                    'cannotBeEmpty' : '此字段不能为空',
                    'checkboxGroup' : '复选框组',
                    'checkbox' : '复选框',
                    'checkboxes' : '复选框',
                    'class' : 'CSS样式',
                    'clearAllMessage' : '您确定要清空所有字段吗?',
                    'clear' : '清除所有',
                    'close' : '关闭',
                    'content' : '内容',
                    'copy' : '复制',
                    'dateField' : '日期字段',
                    'description' : '帮助信息',
                    'descriptionField' : '描述',
                    'devMode' : '开发者模式',
                    'editNames' : '编辑名称',
                    'editorTitle' : '表单元素',
                    'editXML' : '编辑XML',
                    'fieldDeleteWarning' : 'false',
                    'fieldVars' : '字段变量',
                    'fieldNonEditable' : '此字段不允许修改。',
                    'fieldRemoveWarning' : '您确定要移除此字段吗?',
                    'fileUpload' : '文件上传',
                    'formUpdated' : '表单已更新',
                    'getStarted' : '拖入左侧控件绘制表单',
                    'header' : '表头',
                    'hide' : '编辑',
                    'hidden' : '隐藏域',
                    'label' : '标签',
                    'labelEmpty' : '标签字段不能为空',
                    'limitRole' : '角色受限',
                    'mandatory' : '强制填写',
                    'maxlength' : '最大长度',
                    'minOptionMessage' : '此字段至少需要选择两项',
                    'name' : '名称',
                    'no' : '否',
                    'off' : '关',
                    'on' : '开',
                    'option' : '选项',
                    'optional' : '可选',
                    'optionEmpty' : '请输入选择',
                    'paragraph' : '段落',
                    'placeholder' : '占位符',
                    'placeholder.value' : '值',
                    'placeholder.label' : '标签',
                    'placeholder.text' : '请输入文字',
                    'placeholder.textarea' : '请输入文字',
                    'placeholder.email' : '请输入邮件地址',
                    'placeholder.placeholder' : '占位符',
                    'placeholder.className' : 'space separated classes',
                    'placeholder.password' : '请输入密码',
                    'preview' : '预览',
                    'radioGroup' : '单选组',
                    'radio' : '单选框',
                    'removeMessage' : '移除元件',
                    'remove' : '&#215;',
                    'required' : '必填',
                    'richText' : '富文本框',
                    'roles' : '访问',
                    'save' : '保存',
                    'selectOptions' : '选项',
                    'select' : '选择',
                    'selectColor' : '选择颜色',
                    'selectionsMessage' : '允许多选',
                    'size' : '大小',
                    'sizes' : '大小',
                    'sizes.xs' : '最小',
                    'sizes.sm' : '小',
                    'sizes.m' : '中',
                    'sizes.lg' : '大',
                    'style' : '样式',
                    'styles' : '样式',
                    'styles.btn' : '按钮样式',
                    'styles.btn.default' : 'Default',
                    'styles.btn.danger' : 'Danger',
                    'styles.btn.info' : 'Info',
                    'styles.btn.primary' : 'Primary',
                    'styles.btn.success' : 'Success',
                    'styles.btn.warning' : 'Warning',
                    'subtype' : '格式',
                    'text' : '输入框',
                    'textArea' : '文本框',
                    'toggle' : '弹出提示',
                    'warning' : '警告!',
                    'viewXML' : '</>',
                    'viewJSON' : '{ }',
                    'yes' : '是',
                }
            }
        };
        var config = exports.config = {};
    }, {}
], 156: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _typeof2 = require('babel-runtime/helpers/typeof');
        var _typeof3 = _interopRequireDefault(_typeof2);
        var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');
        var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
        var _keys = require('babel-runtime/core-js/object/keys');
        var _keys2 = _interopRequireDefault(_keys);
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getIterator2 = require('babel-runtime/core-js/get-iterator');
        var _getIterator3 = _interopRequireDefault(_getIterator2);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _utils = require('./utils');
        var _utils2 = _interopRequireDefault(_utils);
        var _mi18n2 = require('mi18n');
        var _mi18n3 = _interopRequireDefault(_mi18n2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var control = function () {
            function control(config, preview) {
                    (0, _classCallCheck3.default)(this, control);
                    this.rawConfig = $.extend({}, config);
                    config = $.extend({}, config);
                    this.preview = preview;
                    delete config.isPreview;
                    if (this.preview) {
                        delete config.required;
                    }
                    var properties = ['label', 'description', 'subtype', 'required'];
                    var _iteratorNormalCompletion = true;
                    var _didIteratorError = false;
                    var _iteratorError = undefined;
                    try {
                        for (var _iterator = (0, _getIterator3.default)(properties), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                            var prop = _step.value;
                            this[prop] = config[prop];
                            delete config[prop];
                        }
                    } catch (err) {
                        _didIteratorError = true;
                        _iteratorError = err;
                    } finally {
                        try {
                            if (!_iteratorNormalCompletion && _iterator.return) {
                                _iterator.return();
                            }
                        } finally {
                            if (_didIteratorError) {
                                throw _iteratorError;
                            }
                        }
                    }
                    if (!config.id) {
                        if (config.name) {
                            config.id = config.name;
                        } else {
                            config.id = 'control-' + Math.floor(Math.random() * 10000000 + 1);
                        }
                    }
                    this.id = config.id;
                    this.type = config.type;
                    if (this.description) {
                        config.title = this.description;
                    }
                    if (!control.controlConfig) {
                        control.controlConfig = {};
                    }
                    var classId = this.subtype ? this.type + '.' + this.subtype : this.type;
                    this.classConfig = $.extend({}, control.controlConfig[classId] || {});
                    if (this.subtype) {
                        config.type = this.subtype;
                    }
                    if (this.required) {
                        config['required'] = 'required';
                        config['aria-required'] = 'true';
                    }
                    this.config = config;
                    this.configure();
                }
                (0, _createClass3.default)(control, [{
                    key: 'configure',
                    value: function configure() {}
                }, {
                    key: 'build',
                    value: function build() {
                        var _config = this.config,
                            label = _config.label,
                            type = _config.type,
                            data = (0, _objectWithoutProperties3.default)(_config, ['label', 'type']);
                        return this.markup(type, _utils2.default.parsedHtml(label), data);
                    }
                }, {
                    key: 'on',
                    value: function on(eventType) {
                        var _this = this;
                        var events = {
                            prerender: function prerender(element) {},
                                render: function render(evt) {
                                    var onRender = function onRender() {
                                        if (_this.onRender) {
                                            _this.onRender();
                                        }
                                    };
                                    if (_this.css) {
                                        _utils2.default.getStyles(_this.css);
                                    }
                                    if (_this.js && !_utils2.default.isCached(_this.js)) {
                                        _utils2.default.getScripts(_this.js).done(onRender);
                                    } else {
                                        onRender();
                                    }
                                }
                        };
                        return eventType ? events[eventType] : events;
                    }
                }, {
                    key: 'markup',
                    value: function markup(tag) {
                        var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
                        var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
                        this.element = _utils2.default.markup(tag, content, attributes);
                        return this.element;
                    }
                }, {
                    key: 'parsedHtml',
                    value: function parsedHtml(html) {
                        return _utils2.default.parsedHtml(html);
                    }
                }], [{
                    key: 'register',
                    value: function register(types, controlClass, parentType) {
                        var prefix = parentType ? parentType + '.' : '';
                        if (!control.classRegister) {
                            control.classRegister = {};
                        }
                        if (!Array.isArray(types)) {
                            types = [types];
                        }
                        var _iteratorNormalCompletion2 = true;
                        var _didIteratorError2 = false;
                        var _iteratorError2 = undefined;
                        try {
                            for (var _iterator2 = (0, _getIterator3.default)(types), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
                                var type = _step2.value;
                                if (type.indexOf('.') > -1) {
                                    control.error('Ignoring type ' + type + '. Cannot use the character \'.\' in a type name.');
                                    continue;
                                }
                                control.classRegister[prefix + type] = controlClass;
                            }
                        } catch (err) {
                            _didIteratorError2 = true;
                            _iteratorError2 = err;
                        } finally {
                            try {
                                if (!_iteratorNormalCompletion2 && _iterator2.return) {
                                    _iterator2.return();
                                }
                            } finally {
                                if (_didIteratorError2) {
                                    throw _iteratorError2;
                                }
                            }
                        }
                    }
                }, {
                    key: 'getRegistered',
                    value: function getRegistered() {
                        var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
                        var types = (0, _keys2.default)(control.classRegister);
                        if (!types.length) {
                            return types;
                        }
                        return types.filter(function (key) {
                            if (type) {
                                return key.indexOf(type + '.') > -1;
                            }
                            return key.indexOf('.') == -1;
                        });
                    }
                }, {
                    key: 'getRegisteredSubtypes',
                    value: function getRegisteredSubtypes() {
                        var types = {};
                        for (var key in control.classRegister) {
                            if (control.classRegister.hasOwnProperty(key)) {
                                var _key$split = key.split('.'),
                                    _key$split2 = (0, _slicedToArray3.default)(_key$split, 2),
                                    type = _key$split2[0],
                                    subtype = _key$split2[1];
                                if (!subtype) {
                                    continue;
                                }
                                if (!types[type]) {
                                    types[type] = [];
                                }
                                types[type].push(subtype);
                            }
                        }
                        return types;
                    }
                }, {
                    key: 'getClass',
                    value: function getClass(type, subtype) {
                        var lookup = subtype ? type + '.' + subtype : type;
                        var controlClass = control.classRegister[lookup] || control.classRegister[type];
                        if (!controlClass) {
                            return control.error('Invalid control type. (Type: ' + type + ', Subtype: ' + subtype + '). Please ensure you have registered it, and imported it correctly.');
                        }
                        return controlClass;
                    }
                }, {
                    key: 'loadCustom',
                    value: function loadCustom(controls) {
                        var controlClasses = [];
                        if (controls) {
                            controlClasses = controlClasses.concat(controls);
                        }
                        if (window.fbControls) {
                            controlClasses = controlClasses.concat(window.fbControls);
                        }
                        if (!window.fbControlsLoaded) {
                            var _iteratorNormalCompletion3 = true;
                            var _didIteratorError3 = false;
                            var _iteratorError3 = undefined;
                            try {
                                for (var _iterator3 = (0, _getIterator3.default)(controlClasses), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
                                    var loadControl = _step3.value;
                                    loadControl(control, control.classRegister);
                                }
                            } catch (err) {
                                _didIteratorError3 = true;
                                _iteratorError3 = err;
                            } finally {
                                try {
                                    if (!_iteratorNormalCompletion3 && _iterator3.return) {
                                        _iterator3.return();
                                    }
                                } finally {
                                    if (_didIteratorError3) {
                                        throw _iteratorError3;
                                    }
                                }
                            }
                            window.fbControlsLoaded = true;
                        }
                    }
                }, {
                    key: 'mi18n',
                    value: function mi18n(lookup, args) {
                        var def = this.definition;
                        var i18n = def.i18n || {};
                        var locale = _mi18n3.default.locale;
                        i18n = i18n[locale] || i18n.default || i18n;
                        var lookupCamel = this.camelCase(lookup);
                        var value = (typeof i18n === 'undefined' ? 'undefined' : (0, _typeof3.default)(i18n)) == 'object' ? i18n[lookupCamel] || i18n[lookup] : i18n;
                        if (value) {
                            return value;
                        }
                        var mapped = def.mi18n;
                        if ((typeof mapped === 'undefined' ? 'undefined' : (0, _typeof3.default)(mapped)) === 'object') {
                            mapped = mapped[lookupCamel] || mapped[lookup];
                        }
                        if (!mapped) {
                            mapped = lookupCamel;
                        }
                        return _mi18n3.default.get(mapped, args);
                    }
                }, {
                    key: 'active',
                    value: function active(type) {
                        return !Array.isArray(this.definition.inactive) || this.definition.inactive.indexOf(type) == -1;
                    }
                }, {
                    key: 'label',
                    value: function label(type) {
                        return this.mi18n(type);
                    }
                }, {
                    key: 'icon',
                    value: function icon(type) {
                        var def = this.definition;
                        if (def && (0, _typeof3.default)(def.icon) === 'object') {
                            return def.icon[type];
                        }
                        return def.icon;
                    }
                }, {
                    key: 'error',
                    value: function error(message) {
                        throw new Error(message);
                    }
                }, {
                    key: 'camelCase',
                    value: function camelCase(str) {
                        return _utils2.default.camelCase(str);
                    }
                }, {
                    key: 'definition',
                    get: function get() {
                        return {};
                    }
                }]);
            return control;
        }();
        exports.default = control;
    }, {
        "./utils": 175,
        "babel-runtime/core-js/get-iterator": 3,
        "babel-runtime/core-js/object/keys": 11,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/slicedToArray": 23,
        "babel-runtime/helpers/typeof": 25,
        "mi18n": 151
    }
], 157: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _assign = require('babel-runtime/core-js/object/assign');
        var _assign2 = _interopRequireDefault(_assign);
        var _map = require('babel-runtime/core-js/map');
        var _map2 = _interopRequireDefault(_map);
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);
        var _dom = require('../dom');

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlAutocomplete = function (_control) {
            (0, _inherits3.default)(controlAutocomplete, _control);

            function controlAutocomplete() {
                    (0, _classCallCheck3.default)(this, controlAutocomplete);
                    return (0, _possibleConstructorReturn3.default)(this, (controlAutocomplete.__proto__ || (0, _getPrototypeOf2.default)(controlAutocomplete)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlAutocomplete, [{
                    key: 'build',
                    value: function build() {
                        var _this2 = this;
                        var _config = this.config,
                            values = _config.values,
                            type = _config.type,
                            data = (0, _objectWithoutProperties3.default)(_config, ['values', 'type']);
                        var keyboardNav = function keyboardNav(e) {
                            var list = e.target.nextSibling.nextSibling;
                            var hiddenField = e.target.nextSibling;
                            var activeOption = _this2.getActiveOption(list);
                            var keyCodeMapVals = [
                                [38,
                                    function () {
                                        var previous = _this2.getPreviousOption(activeOption);
                                        if (previous) {
                                            _this2.selectOption(list, previous);
                                        }
                                    }
                                ],
                                [40,
                                    function () {
                                        var next = _this2.getNextOption(activeOption);
                                        if (next) {
                                            _this2.selectOption(list, next);
                                        }
                                    }
                                ],
                                [13,
                                    function () {
                                        if (activeOption) {
                                            e.target.value = activeOption.innerHTML;
                                            hiddenField.value = activeOption.getAttribute('value');
                                            if (list.style.display === 'none') {
                                                _this2.showList(list, activeOption);
                                            } else {
                                                _this2.hideList(list);
                                            }
                                        }
                                        e.preventDefault();
                                    }
                                ],
                                [27,
                                    function () {
                                        _this2.hideList(list);
                                    }
                                ]
                            ];
                            var keyCodeMap = new _map2.default(keyCodeMapVals);
                            var direction = keyCodeMap.get(e.keyCode);
                            if (!direction) {
                                direction = function direction() {
                                    return false;
                                };
                            }
                            return direction();
                        };
                        var fauxEvents = {
                            focus: function focus(evt) {
                                    var list = evt.target.nextSibling.nextSibling;
                                    var filteredOptions = (0, _dom.filter)(list.querySelectorAll('li'), evt.target.value);
                                    evt.target.addEventListener('keydown', keyboardNav);
                                    if (evt.target.value.length > 0) {
                                        var selectedOption = filteredOptions.length > 0 ? filteredOptions[filteredOptions.length - 1] : null;
                                        _this2.showList(list, selectedOption);
                                    }
                                },
                                blur: function blur(evt) {
                                    evt.target.removeEventListener('keydown', keyboardNav);
                                    setTimeout(function () {
                                        evt.target.nextSibling.nextSibling.style.display = 'none';
                                    }, 200);
                                },
                                input: function input(evt) {
                                    var list = evt.target.nextSibling.nextSibling;
                                    var hiddenField = evt.target.nextSibling;
                                    hiddenField.value = evt.target.value;
                                    var filteredOptions = (0, _dom.filter)(list.querySelectorAll('li'), evt.target.value);
                                    if (filteredOptions.length == 0) {
                                        _this2.hideList(list);
                                    } else {
                                        var activeOption = _this2.getActiveOption(list);
                                        if (!activeOption) {
                                            activeOption = filteredOptions[filteredOptions.length - 1];
                                        }
                                        _this2.showList(list, activeOption);
                                    }
                                }
                        };
                        var fauxAttrs = (0, _assign2.default)({}, data, {
                            id: data.id + '-input',
                            autocomplete: 'off',
                            events: fauxEvents
                        });
                        var hiddenAttrs = (0, _assign2.default)({}, data, {
                            type: 'hidden'
                        });
                        delete fauxAttrs.name;
                        var field = [this.markup('input', null, fauxAttrs), this.markup('input', null, hiddenAttrs)];
                        var options = values.map(function (optionData) {
                            var label = optionData.label;
                            var config = {
                                events: {
                                    click: function click(evt) {
                                        var list = evt.target.parentElement;
                                        var field = list.previousSibling.previousSibling;
                                        field.value = optionData.label;
                                        field.nextSibling.value = optionData.value;
                                        _this2.hideList(list);
                                    }
                                },
                                value: optionData.value
                            };
                            return _this2.markup('li', label, config);
                        });
                        field.push(this.markup('ul', options, {
                            id: data.id + '-list',
                            className: 'fb-' + type + '-list'
                        }));
                        return field;
                    }
                }, {
                    key: 'hideList',
                    value: function hideList(list) {
                        this.selectOption(list, null);
                        list.style.display = 'none';
                    }
                }, {
                    key: 'showList',
                    value: function showList(list, selectedOption) {
                        this.selectOption(list, selectedOption);
                        list.style.display = 'block';
                        list.style.width = list.parentElement.offsetWidth + 'px';
                    }
                }, {
                    key: 'getActiveOption',
                    value: function getActiveOption(list) {
                        var activeOption = list.getElementsByClassName('active-option')[0];
                        if (activeOption && activeOption.style.display !== 'none') {
                            return activeOption;
                        }
                        return null;
                    }
                }, {
                    key: 'getPreviousOption',
                    value: function getPreviousOption(current) {
                        var previous = current;
                        do {
                            previous = previous ? previous.previousSibling : null;
                        } while (previous != null && previous.style.display === 'none');
                        return previous;
                    }
                }, {
                    key: 'getNextOption',
                    value: function getNextOption(current) {
                        var next = current;
                        do {
                            next = next ? next.nextSibling : null;
                        } while (next != null && next.style.display === 'none');
                        return next;
                    }
                }, {
                    key: 'selectOption',
                    value: function selectOption(list, selectedOption) {
                        var options = list.querySelectorAll('li');
                        options.forEach(function (option) {
                            option.classList.remove('active-option');
                        });
                        if (selectedOption) {
                            selectedOption.classList.add('active-option');
                        }
                    }
                }, {
                    key: 'onRender',
                    value: function onRender(evt) {}
                }]);
            return controlAutocomplete;
        }(_control3.default);
        exports.default = controlAutocomplete;
        _control3.default.register('autocomplete', controlAutocomplete);
    }, {
        "../control": 156,
        "../dom": 170,
        "babel-runtime/core-js/map": 5,
        "babel-runtime/core-js/object/assign": 6,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 158: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlButton = function (_control) {
            (0, _inherits3.default)(controlButton, _control);

            function controlButton() {
                    (0, _classCallCheck3.default)(this, controlButton);
                    return (0, _possibleConstructorReturn3.default)(this, (controlButton.__proto__ || (0, _getPrototypeOf2.default)(controlButton)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlButton, [{
                    key: 'build',
                    value: function build() {
                        return {
                            field: this.markup('button', this.label, this.config),
                            layout: 'noLabel'
                        };
                    }
                }]);
            return controlButton;
        }(_control3.default);
        exports.default = controlButton;
        _control3.default.register('button', controlButton);
        _control3.default.register(['button', 'submit', 'reset'], controlButton, 'button');
    }, {
        "../control": 156,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 159: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _keys = require('babel-runtime/core-js/object/keys');
        var _keys2 = _interopRequireDefault(_keys);
        var _getIterator2 = require('babel-runtime/core-js/get-iterator');
        var _getIterator3 = _interopRequireDefault(_getIterator2);
        var _assign = require('babel-runtime/core-js/object/assign');
        var _assign2 = _interopRequireDefault(_assign);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);
        var _mi18n = require('mi18n');
        var _mi18n2 = _interopRequireDefault(_mi18n);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlCustom = function (_control) {
            (0, _inherits3.default)(controlCustom, _control);

            function controlCustom() {
                    (0, _classCallCheck3.default)(this, controlCustom);
                    return (0, _possibleConstructorReturn3.default)(this, (controlCustom.__proto__ || (0, _getPrototypeOf2.default)(controlCustom)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlCustom, [{
                    key: 'build',
                    value: function build() {
                        var custom = controlCustom.templates[this.type];
                        if (!custom) {
                            return this.error('Invalid custom control type. Please ensure you have registered it correctly as a template option.');
                        }
                        var fieldData = (0, _assign2.default)(this.config);
                        var properties = ['label', 'description', 'subtype', 'id', 'isPreview', 'required', 'title', 'aria-required', 'type'];
                        var _iteratorNormalCompletion = true;
                        var _didIteratorError = false;
                        var _iteratorError = undefined;
                        try {
                            for (var _iterator = (0, _getIterator3.default)(properties), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                                var prop = _step.value;
                                fieldData[prop] = this.config[prop] || this[prop];
                            }
                        } catch (err) {
                            _didIteratorError = true;
                            _iteratorError = err;
                        } finally {
                            try {
                                if (!_iteratorNormalCompletion && _iterator.return) {
                                    _iterator.return();
                                }
                            } finally {
                                if (_didIteratorError) {
                                    throw _iteratorError;
                                }
                            }
                        }
                        custom = custom.bind(this);
                        custom = custom(fieldData);
                        if (custom.js) {
                            this.js = custom.js;
                        }
                        if (custom.css) {
                            this.css = custom.css;
                        }
                        this.onRender = custom.onRender;
                        return {
                            field: custom.field,
                            layout: custom.layout
                        };
                    }
                }], [{
                    key: 'register',
                    value: function register() {
                        var templates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
                        var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
                        if (!controlCustom.def) {
                            controlCustom.def = {
                                icon: {},
                                i18n: {}
                            };
                        }
                        controlCustom.templates = templates;
                        var locale = _mi18n2.default.locale;
                        if (!controlCustom.def.i18n[locale]) {
                            controlCustom.def.i18n[locale] = {};
                        }
                        _control3.default.register((0, _keys2.default)(templates), controlCustom);
                        var _iteratorNormalCompletion2 = true;
                        var _didIteratorError2 = false;
                        var _iteratorError2 = undefined;
                        try {
                            for (var _iterator2 = (0, _getIterator3.default)(fields), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
                                var field = _step2.value;
                                var type = field.type;
                                field.attrs = field.attrs || {};
                                if (!type) {
                                    if (!field.attrs.type) {
                                        this.error('Ignoring invalid custom field definition. Please specify a type property.');
                                        continue;
                                    }
                                    type = field.attrs.type;
                                }
                                var lookup = field.subtype || type;
                                if (!templates[type]) {
                                    var controlClass = _control3.default.getClass(type, field.subtype);
                                    if (!controlClass) {
                                        this.error('Error while registering custom field: ' + type + (field.subtype ? ':' + field.subtype : '') + '. Unable to find any existing defined control or template for rendering.');
                                        continue;
                                    }
                                    lookup = type + '-' + Math.floor(Math.random() * 9000 + 1000);
                                    controlCustom.customRegister[lookup] = $.extend(field, {
                                        type: type,
                                        class: controlClass
                                    });
                                }
                                controlCustom.def.i18n[locale][lookup] = field.label;
                                controlCustom.def.icon[lookup] = field.icon;
                            }
                        } catch (err) {
                            _didIteratorError2 = true;
                            _iteratorError2 = err;
                        } finally {
                            try {
                                if (!_iteratorNormalCompletion2 && _iterator2.return) {
                                    _iterator2.return();
                                }
                            } finally {
                                if (_didIteratorError2) {
                                    throw _iteratorError2;
                                }
                            }
                        }
                    }
                }, {
                    key: 'getRegistered',
                    value: function getRegistered() {
                        var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
                        if (type) {
                            return _control3.default.getRegistered(type);
                        }
                        return (0, _keys2.default)(controlCustom.customRegister);
                    }
                }, {
                    key: 'lookup',
                    value: function lookup(_lookup) {
                        return controlCustom.customRegister[_lookup];
                    }
                }, {
                    key: 'definition',
                    get: function get() {
                        return controlCustom.def;
                    }
                }]);
            return controlCustom;
        }(_control3.default);
        exports.default = controlCustom;
        controlCustom.customRegister = {};
    }, {
        "../control": 156,
        "babel-runtime/core-js/get-iterator": 3,
        "babel-runtime/core-js/object/assign": 6,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/core-js/object/keys": 11,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/possibleConstructorReturn": 22,
        "mi18n": 151
    }
], 160: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _getIterator2 = require('babel-runtime/core-js/get-iterator');
        var _getIterator3 = _interopRequireDefault(_getIterator2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _text = require('./text');
        var _text2 = _interopRequireDefault(_text);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlFineUploader = function (_controlText) {
            (0, _inherits3.default)(controlFineUploader, _controlText);

            function controlFineUploader() {
                    (0, _classCallCheck3.default)(this, controlFineUploader);
                    return (0, _possibleConstructorReturn3.default)(this, (controlFineUploader.__proto__ || (0, _getPrototypeOf2.default)(controlFineUploader)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlFineUploader, [{
                    key: 'configure',
                    value: function configure() {
                        var _this2 = this;
                        this.js = this.classConfig.js || '//cdnjs.cloudflare.com/ajax/libs/file-uploader/5.14.2/jquery.fine-uploader/jquery.fine-uploader.min.js';
                        this.css = [this.classConfig.css || '//cdnjs.cloudflare.com/ajax/libs/file-uploader/5.14.2/jquery.fine-uploader/fine-uploader-gallery.min.css', {
                            type: 'inline',
                            id: 'fineuploader-inline',
                            style: '\n          .qq-uploader .qq-error-message {\n            position: absolute;\n            left: 20%;\n            top: 20px;\n            width: 60%;\n            color: #a94442;\n            background: #f2dede;\n            border: solid 1px #ebccd1;\n            padding: 15px;\n            line-height: 1.5em;\n            text-align: center;\n            z-index: 99999;\n          }\n          .qq-uploader .qq-error-message span {\n            display: inline-block;\n            text-align: left;\n          }'
                        }];
                        this.handler = this.classConfig.handler || '/upload';
                        ['js', 'css', 'handler'].forEach(function (key) {
                            return delete _this2.classConfig[key];
                        });
                        var template = this.classConfig.template || '\n      <div class="qq-uploader-selector qq-uploader qq-gallery" qq-drop-area-text="Drop files here">\n        <div class="qq-total-progress-bar-container-selector qq-total-progress-bar-container">\n          <div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-total-progress-bar-selector qq-progress-bar qq-total-progress-bar"></div>\n        </div>\n        <div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>\n          <span class="qq-upload-drop-area-text-selector"></span>\n        </div>\n        <div class="qq-upload-button-selector qq-upload-button">\n          <div>Upload a file</div>\n        </div>\n        <span class="qq-drop-processing-selector qq-drop-processing">\n          <span>Processing dropped files...</span>\n          <span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>\n        </span>\n        <ul class="qq-upload-list-selector qq-upload-list" role="region" aria-live="polite" aria-relevant="additions removals">\n          <li>\n            <span role="status" class="qq-upload-status-text-selector qq-upload-status-text"></span>\n            <div class="qq-progress-bar-container-selector qq-progress-bar-container">\n              <div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-progress-bar-selector qq-progress-bar"></div>\n            </div>\n            <span class="qq-upload-spinner-selector qq-upload-spinner"></span>\n            <div class="qq-thumbnail-wrapper">\n              <img class="qq-thumbnail-selector" qq-max-size="120" qq-server-scale>\n            </div>\n            <button type="button" class="qq-upload-cancel-selector qq-upload-cancel">X</button>\n            <button type="button" class="qq-upload-retry-selector qq-upload-retry">\n              <span class="qq-btn qq-retry-icon" aria-label="Retry"></span>\n              Retry\n            </button>\n            <div class="qq-file-info">\n              <div class="qq-file-name">\n                <span class="qq-upload-file-selector qq-upload-file"></span>\n                <span class="qq-edit-filename-icon-selector qq-btn qq-edit-filename-icon" aria-label="Edit filename"></span>\n              </div>\n              <input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">\n              <span class="qq-upload-size-selector qq-upload-size"></span>\n              <button type="button" class="qq-btn qq-upload-delete-selector qq-upload-delete">\n                <span class="qq-btn qq-delete-icon" aria-label="Delete"></span>\n              </button>\n              <button type="button" class="qq-btn qq-upload-pause-selector qq-upload-pause">\n                <span class="qq-btn qq-pause-icon" aria-label="Pause"></span>\n              </button>\n              <button type="button" class="qq-btn qq-upload-continue-selector qq-upload-continue">\n                <span class="qq-btn qq-continue-icon" aria-label="Continue"></span>\n              </button>\n            </div>\n          </li>\n        </ul>\n        <dialog class="qq-alert-dialog-selector">\n          <div class="qq-dialog-message-selector"></div>\n          <div class="qq-dialog-buttons">\n            <button type="button" class="qq-cancel-button-selector">Close</button>\n          </div>\n        </dialog>\n        <dialog class="qq-confirm-dialog-selector">\n          <div class="qq-dialog-message-selector"></div>\n          <div class="qq-dialog-buttons">\n            <button type="button" class="qq-cancel-button-selector">No</button>\n            <button type="button" class="qq-ok-button-selector">Yes</button>\n          </div>\n        </dialog>\n        <dialog class="qq-prompt-dialog-selector">\n          <div class="qq-dialog-message-selector"></div>\n          <input type="text">\n          <div class="qq-dialog-buttons">\n            <button type="button" class="qq-cancel-button-selector">Cancel</button>\n            <button type="button" class="qq-ok-button-selector">Ok</button>\n          </div>\n        </dialog>\n      </div>';
                        this.fineTemplate = $('<div/>').attr('id', 'qq-template').html(template);
                    }
                }, {
                    key: 'build',
                    value: function build() {
                        this.input = this.markup('input', null, {
                            type: 'hidden',
                            name: this.config.name,
                            id: this.config.name
                        });
                        this.wrapper = this.markup('div', '', {
                            id: this.config.name + '-wrapper'
                        });
                        return [this.input, this.wrapper];
                    }
                }, {
                    key: 'onRender',
                    value: function onRender() {
                        var wrapper = $(this.wrapper);
                        var input = $(this.input);
                        var config = $.extend(true, {
                            request: {
                                endpoint: this.handler
                            },
                            deleteFile: {
                                enabled: true,
                                endpoint: this.handler
                            },
                            chunking: {
                                enabled: true,
                                concurrent: {
                                    enabled: true
                                },
                                success: {
                                    endpoint: this.handler + (this.handler.indexOf('?') == -1 ? '?' : '&') + 'done'
                                }
                            },
                            resume: {
                                enabled: true
                            },
                            retry: {
                                enableAuto: true,
                                showButton: true
                            },
                            callbacks: {
                                onError: function onError(id, name, errorReason, xhrOrXdr) {
                                        if (errorReason.slice(-1) != '.') {
                                            errorReason += '.';
                                        }
                                        var error = $('<div />').addClass('qq-error-message').html('<span>Error processing upload: <b>' + name + '</b>.<br />Reason: ' + errorReason + '</span>').prependTo(wrapper.find('.qq-uploader'));
                                        setTimeout(function () {
                                            error.fadeOut(function () {
                                                error.remove();
                                            });
                                        }, 6000);
                                    },
                                    onStatusChange: function onStatusChange(id, oldStatus, newStatus) {
                                        var uploads = wrapper.fineUploader('getUploads');
                                        var successful = [];
                                        var _iteratorNormalCompletion = true;
                                        var _didIteratorError = false;
                                        var _iteratorError = undefined;
                                        try {
                                            for (var _iterator = (0, _getIterator3.default)(uploads), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                                                var upload = _step.value;
                                                if (upload.status != 'upload successful') {
                                                    continue;
                                                }
                                                successful.push(upload.name);
                                            }
                                        } catch (err) {
                                            _didIteratorError = true;
                                            _iteratorError = err;
                                        } finally {
                                            try {
                                                if (!_iteratorNormalCompletion && _iterator.return) {
                                                    _iterator.return();
                                                }
                                            } finally {
                                                if (_didIteratorError) {
                                                    throw _iteratorError;
                                                }
                                            }
                                        }
                                        input.val(successful.join(', '));
                                    }
                            },
                            template: this.fineTemplate
                        }, this.classConfig);
                        wrapper.fineUploader(config);
                    }
                }], [{
                    key: 'definition',
                    get: function get() {
                        return {
                            i18n: {
                                default: 'Fine Uploader'
                            }
                        };
                    }
                }]);
            return controlFineUploader;
        }(_text2.default);
        exports.default = controlFineUploader;
        _text2.default.register('file', _text2.default, 'file');
        _text2.default.register('fineuploader', controlFineUploader, 'file');
    }, {
        "./text": 165,
        "babel-runtime/core-js/get-iterator": 3,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 161: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlHidden = function (_control) {
            (0, _inherits3.default)(controlHidden, _control);

            function controlHidden() {
                    (0, _classCallCheck3.default)(this, controlHidden);
                    return (0, _possibleConstructorReturn3.default)(this, (controlHidden.__proto__ || (0, _getPrototypeOf2.default)(controlHidden)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlHidden, [{
                    key: 'build',
                    value: function build() {
                        return {
                            field: this.markup('input', null, this.config),
                            layout: 'hidden'
                        };
                    }
                }]);
            return controlHidden;
        }(_control3.default);
        exports.default = controlHidden;
        _control3.default.register('hidden', controlHidden);
    }, {
        "../control": 156,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 162: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _autocomplete = require('./autocomplete');
        var _autocomplete2 = _interopRequireDefault(_autocomplete);
        var _button = require('./button');
        var _button2 = _interopRequireDefault(_button);
        var _custom = require('./custom');
        var _custom2 = _interopRequireDefault(_custom);
        var _hidden = require('./hidden');
        var _hidden2 = _interopRequireDefault(_hidden);
        var _paragraph = require('./paragraph');
        var _paragraph2 = _interopRequireDefault(_paragraph);
        var _select = require('./select');
        var _select2 = _interopRequireDefault(_select);
        var _text = require('./text');
        var _text2 = _interopRequireDefault(_text);
        var _file = require('./file.fineuploader');
        var _file2 = _interopRequireDefault(_file);
        var _textarea = require('./textarea');
        var _textarea2 = _interopRequireDefault(_textarea);
        var _textarea3 = require('./textarea.tinymce');
        var _textarea4 = _interopRequireDefault(_textarea3);
        var _textarea5 = require('./textarea.quill');
        var _textarea6 = _interopRequireDefault(_textarea5);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        exports.default = {
            controlAutocomplete: _autocomplete2.default,
            controlButton: _button2.default,
            controlCustom: _custom2.default,
            controlHidden: _hidden2.default,
            controlParagraph: _paragraph2.default,
            controlSelect: _select2.default,
            controlText: _text2.default,
            controlFineUploader: _file2.default,
            controlTextarea: _textarea2.default,
            controlTinymce: _textarea4.default,
            controlQuill: _textarea6.default
        };
    }, {
        "./autocomplete": 157,
        "./button": 158,
        "./custom": 159,
        "./file.fineuploader": 160,
        "./hidden": 161,
        "./paragraph": 163,
        "./select": 164,
        "./text": 165,
        "./textarea": 166,
        "./textarea.quill": 167,
        "./textarea.tinymce": 168
    }
], 163: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);
        var _utils = require('../utils');
        var _utils2 = _interopRequireDefault(_utils);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlParagraph = function (_control) {
            (0, _inherits3.default)(controlParagraph, _control);

            function controlParagraph() {
                    (0, _classCallCheck3.default)(this, controlParagraph);
                    return (0, _possibleConstructorReturn3.default)(this, (controlParagraph.__proto__ || (0, _getPrototypeOf2.default)(controlParagraph)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlParagraph, [{
                    key: 'build',
                    value: function build() {
                        var _config = this.config,
                            type = _config.type,
                            attrs = (0, _objectWithoutProperties3.default)(_config, ['type']);
                        var typeMap = {
                            'paragraph': 'p',
                            'header': this.subtype
                        };
                        if (typeMap[type]) {
                            type = typeMap[type];
                        }
                        return {
                            field: this.markup(type, _utils2.default.parsedHtml(this.label), attrs),
                            layout: 'noLabel'
                        };
                    }
                }]);
            return controlParagraph;
        }(_control3.default);
        exports.default = controlParagraph;
        _control3.default.register(['paragraph', 'header'], controlParagraph);
        _control3.default.register(['p', 'address', 'blockquote', 'canvas', 'output'], controlParagraph, 'paragraph');
        _control3.default.register(['h1', 'h2', 'h3'], controlParagraph, 'header');
    }, {
        "../control": 156,
        "../utils": 175,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 164: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _assign = require('babel-runtime/core-js/object/assign');
        var _assign2 = _interopRequireDefault(_assign);
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlSelect = function (_control) {
            (0, _inherits3.default)(controlSelect, _control);

            function controlSelect() {
                    (0, _classCallCheck3.default)(this, controlSelect);
                    return (0, _possibleConstructorReturn3.default)(this, (controlSelect.__proto__ || (0, _getPrototypeOf2.default)(controlSelect)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlSelect, [{
                    key: 'build',
                    value: function build() {
                        var _this2 = this;
                        var options = [];
                        var _config = this.config,
                            values = _config.values,
                            value = _config.value,
                            placeholder = _config.placeholder,
                            type = _config.type,
                            inline = _config.inline,
                            other = _config.other,
                            toggle = _config.toggle,
                            data = (0, _objectWithoutProperties3.default)(_config, ['values', 'value', 'placeholder', 'type', 'inline', 'other', 'toggle']);
                        var optionType = type.replace('-group', '');
                        var isSelect = type === 'select';
                        if (data.multiple || type === 'checkbox-group') {
                            data.name = data.name + '[]';
                        }
                        if (type === 'checkbox-group' && data.required) {
                            this.onRender = this.groupRequired;
                        }
                        delete data.title;
                        if (values) {
                            if (placeholder && isSelect) {
                                options.push(this.markup('option', placeholder, {
                                    disabled: null,
                                    selected: null
                                }));
                            }
                            for (var i = 0; i < values.length; i++) {
                                var option = values[i];
                                if (typeof option === 'string') {
                                    option = {
                                        'label': option,
                                        'value': option
                                    };
                                }
                                var _option = option,
                                    _option$label = _option.label,
                                    label = _option$label === undefined ? '' : _option$label,
                                    optionAttrs = (0, _objectWithoutProperties3.default)(_option, ['label']);
                                optionAttrs.id = data.id + '-' + i;
                                if (!optionAttrs.selected || placeholder) {
                                    delete optionAttrs.selected;
                                }
                                if (typeof value !== 'undefined' && optionAttrs.value === value) {
                                    optionAttrs.selected = true;
                                }
                                if (isSelect) {
                                    var o = this.markup('option', document.createTextNode(label), optionAttrs);
                                    options.push(o);
                                } else {
                                    var wrapperClass = optionType;
                                    var labelContents = [label];
                                    if (inline) {
                                        wrapperClass += '-inline';
                                    }
                                    optionAttrs.type = optionType;
                                    if (optionAttrs.selected) {
                                        optionAttrs.checked = 'checked';
                                        delete optionAttrs.selected;
                                    }
                                    var input = this.markup('input', null, (0, _assign2.default)({}, data, optionAttrs));
                                    var labelAttrs = {
                                        for: optionAttrs.id
                                    };
                                    label = this.markup('label', labelContents, labelAttrs);
                                    var output = [input, label];
                                    if (toggle) {
                                        labelAttrs.className = 'kc-toggle';
                                        labelContents.unshift(input, this.markup('span'));
                                        output = this.markup('label', labelContents, labelAttrs);
                                    }
                                    var wrapper = this.markup('div', output, {
                                        className: wrapperClass
                                    });
                                    options.push(wrapper);
                                }
                            }
                            if (!isSelect && other) {
                                var otherOptionAttrs = {
                                    id: data.id + '-other',
                                    className: data.className + ' other-option',
                                    value: '',
                                    events: {
                                        click: function click() {
                                            return _this2.otherOptionCB(otherOptionAttrs.id);
                                        }
                                    }
                                };
                                var _wrapperClass = optionType;
                                if (inline) {
                                    _wrapperClass += '-inline';
                                }
                                var optionAttrs = (0, _assign2.default)({}, data, otherOptionAttrs);
                                optionAttrs.type = optionType;
                                var otherValAttrs = {
                                    type: 'text',
                                    events: {
                                        input: function input(evt) {
                                            var otherInput = evt.target;
                                            var other = otherInput.parentElement.previousElementSibling;
                                            other.value = otherInput.value;
                                        }
                                    },
                                    id: otherOptionAttrs.id + '-value',
                                    className: 'other-val'
                                };
                                var primaryInput = this.markup('input', null, optionAttrs);
                                var otherInputs = [document.createTextNode('Other'), this.markup('input', null, otherValAttrs)];
                                var inputLabel = this.markup('label', otherInputs, {
                                    for: optionAttrs.id
                                });
                                var _wrapper = this.markup('div', [primaryInput, inputLabel], {
                                    className: _wrapperClass
                                });
                                options.push(_wrapper);
                            }
                        }
                        if (type == 'select') {
                            return this.markup(optionType, options, data);
                        } else {
                            return this.markup('div', options, {
                                className: type
                            });
                        }
                    }
                }, {
                    key: 'groupRequired',
                    value: function groupRequired() {
                        var checkboxes = this.element.getElementsByTagName('input');
                        var setValidity = function setValidity(checkbox, isValid) {
                            var minReq = _control3.default.mi18n('minSelectionRequired', 1);
                            if (!isValid) {
                                checkbox.setCustomValidity(minReq);
                            } else {
                                checkbox.setCustomValidity('');
                            }
                        };
                        var toggleRequired = function toggleRequired(checkboxes, isValid) {
                            [].forEach.call(checkboxes, function (cb) {
                                if (isValid) {
                                    cb.removeAttribute('required');
                                } else {
                                    cb.setAttribute('required', 'required');
                                }
                                setValidity(cb, isValid);
                            });
                        };
                        var toggleValid = function toggleValid() {
                            var isValid = [].some.call(checkboxes, function (cb) {
                                return cb.checked;
                            });
                            toggleRequired(checkboxes, isValid);
                        };
                        for (var i = checkboxes.length - 1; i >= 0; i--) {
                            checkboxes[i].addEventListener('change', toggleValid);
                        }
                        toggleValid();
                    }
                }, {
                    key: 'otherOptionCB',
                    value: function otherOptionCB(otherId) {
                        var otherInput = document.getElementById(otherId);
                        var otherInputValue = document.getElementById(otherId + '-value');
                        if (otherInput.checked) {
                            otherInputValue.style.display = 'inline-block';
                        } else {
                            otherInputValue.style.display = 'none';
                        }
                    }
                }], [{
                    key: 'definition',
                    get: function get() {
                        return {
                            inactive: ['checkbox'],
                            mi18n: {
                                minSelectionRequired: 'minSelectionRequired'
                            }
                        };
                    }
                }]);
            return controlSelect;
        }(_control3.default);
        exports.default = controlSelect;
        _control3.default.register(['select', 'checkbox-group', 'radio-group', 'checkbox'], controlSelect);
    }, {
        "../control": 156,
        "babel-runtime/core-js/object/assign": 6,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 165: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlText = function (_control) {
            (0, _inherits3.default)(controlText, _control);

            function controlText() {
                    (0, _classCallCheck3.default)(this, controlText);
                    return (0, _possibleConstructorReturn3.default)(this, (controlText.__proto__ || (0, _getPrototypeOf2.default)(controlText)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlText, [{
                    key: 'build',
                    value: function build() {
                        return this.markup('input', null, this.config);
                    }
                }], [{
                    key: 'definition',
                    get: function get() {
                        return {
                            mi18n: {
                                date: 'dateField',
                                file: 'fileUpload'
                            }
                        };
                    }
                }]);
            return controlText;
        }(_control3.default);
        exports.default = controlText;
        _control3.default.register(['text', 'file', 'date', 'number'], controlText);
        _control3.default.register(['text', 'password', 'email', 'color', 'tel'], controlText, 'text');
    }, {
        "../control": 156,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 166: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _get2 = require('babel-runtime/helpers/get');
        var _get3 = _interopRequireDefault(_get2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _control2 = require('../control');
        var _control3 = _interopRequireDefault(_control2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlTextarea = function (_control) {
            (0, _inherits3.default)(controlTextarea, _control);

            function controlTextarea() {
                    (0, _classCallCheck3.default)(this, controlTextarea);
                    return (0, _possibleConstructorReturn3.default)(this, (controlTextarea.__proto__ || (0, _getPrototypeOf2.default)(controlTextarea)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlTextarea, [{
                    key: 'build',
                    value: function build() {
                        var _config = this.config,
                            _config$value = _config.value,
                            value = _config$value === undefined ? '' : _config$value,
                            attrs = (0, _objectWithoutProperties3.default)(_config, ['value']);
                        this.field = this.markup('textarea', this.parsedHtml(value), attrs);
                        return this.field;
                    }
                }, {
                    key: 'on',
                    value: function on(eventType) {
                        var _this2 = this;
                        if (eventType == 'prerender' && this.preview) {
                            return function (element) {
                                if (_this2.field) {
                                    element = _this2.field;
                                }
                                $(element).on('mousedown', function (e) {
                                    e.stopPropagation();
                                });
                            };
                        }
                        return (0, _get3.default)(controlTextarea.prototype.__proto__ || (0, _getPrototypeOf2.default)(controlTextarea.prototype), 'on', this).call(this, eventType);
                    }
                }], [{
                    key: 'definition',
                    get: function get() {
                        return {
                            mi18n: {
                                textarea: 'textArea'
                            }
                        };
                    }
                }]);
            return controlTextarea;
        }(_control3.default);
        exports.default = controlTextarea;
        _control3.default.register('textarea', controlTextarea);
        _control3.default.register('textarea', controlTextarea, 'textarea');
    }, {
        "../control": 156,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/get": 19,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 167: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _textarea = require('./textarea');
        var _textarea2 = _interopRequireDefault(_textarea);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlQuill = function (_controlTextarea) {
            (0, _inherits3.default)(controlQuill, _controlTextarea);

            function controlQuill() {
                    (0, _classCallCheck3.default)(this, controlQuill);
                    return (0, _possibleConstructorReturn3.default)(this, (controlQuill.__proto__ || (0, _getPrototypeOf2.default)(controlQuill)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlQuill, [{
                    key: 'configure',
                    value: function configure() {
                        this.js = '//cdn.quilljs.com/1.2.4/quill.js';
                        this.css = '//cdn.quilljs.com/1.2.4/quill.snow.css';
                    }
                }, {
                    key: 'build',
                    value: function build() {
                        var _config = this.config,
                            _config$value = _config.value,
                            value = _config$value === undefined ? '' : _config$value,
                            attrs = (0, _objectWithoutProperties3.default)(_config, ['value']);
                        this.field = this.markup('div', null, attrs);
                        return this.field;
                    }
                }, {
                    key: 'onRender',
                    value: function onRender(evt) {
                        var value = this.config.value || '';
                        var Delta = window.Quill.import('delta');
                        window.fbEditors.quill[this.id] = {};
                        var editor = window.fbEditors.quill[this.id];
                        editor.instance = new window.Quill(this.field, {
                            modules: {
                                toolbar: [
                                    [{
                                        'header': [1, 2, false]
                                    }],
                                    ['bold', 'italic', 'underline'],
                                    ['code-block']
                                ]
                            },
                            placeholder: this.config.placeholder || '',
                            theme: 'snow'
                        });
                        editor.data = new Delta();
                        if (value) {
                            editor.instance.setContents(window.JSON.parse(this.parsedHtml(value)));
                        }
                        editor.instance.on('text-change', function (delta) {
                            editor.data = editor.data.compose(delta);
                        });
                    }
                }]);
            return controlQuill;
        }(_textarea2.default);
        exports.default = controlQuill;
        _textarea2.default.register('quill', controlQuill, 'textarea');
    }, {
        "./textarea": 166,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 168: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
        var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
        var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
        var _inherits2 = require('babel-runtime/helpers/inherits');
        var _inherits3 = _interopRequireDefault(_inherits2);
        var _textarea = require('./textarea');
        var _textarea2 = _interopRequireDefault(_textarea);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var controlTinymce = function (_controlTextarea) {
            (0, _inherits3.default)(controlTinymce, _controlTextarea);

            function controlTinymce() {
                    (0, _classCallCheck3.default)(this, controlTinymce);
                    return (0, _possibleConstructorReturn3.default)(this, (controlTinymce.__proto__ || (0, _getPrototypeOf2.default)(controlTinymce)).apply(this, arguments));
                }
                (0, _createClass3.default)(controlTinymce, [{
                    key: 'configure',
                    value: function configure() {
                        this.js = ['//cdn.tinymce.com/4/tinymce.min.js'];
                        if (this.classConfig.js) {
                            var js = this.classConfig.js;
                            if (!Array.isArray(js)) {
                                js = new Array(js);
                            }
                            this.js.concat(js);
                            delete this.classConfig.js;
                        }
                        if (this.classConfig.css) {
                            this.css = this.classConfig.css;
                        }
                        this.editorOptions = {
                            height: 250,
                            paste_data_images: true,
                            plugins: ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table contextmenu paste code'],
                            toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table'
                        };
                    }
                }, {
                    key: 'build',
                    value: function build() {
                        var _config = this.config,
                            _config$value = _config.value,
                            value = _config$value === undefined ? '' : _config$value,
                            attrs = (0, _objectWithoutProperties3.default)(_config, ['value']);
                        this.field = this.markup('textarea', this.parsedHtml(value), attrs);
                        return this.field;
                    }
                }, {
                    key: 'onRender',
                    value: function onRender(evt) {
                        if (window.tinymce.editors[this.id]) {
                            window.tinymce.editors[this.id].remove();
                        }
                        var options = $.extend(this.editorOptions, this.classConfig);
                        options.target = this.field;
                        window.tinymce.init(options);
                    }
                }]);
            return controlTinymce;
        }(_textarea2.default);
        exports.default = controlTinymce;
        _textarea2.default.register('tinymce', controlTinymce, 'textarea');
    }, {
        "./textarea": 166,
        "babel-runtime/core-js/object/get-prototype-of": 10,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/inherits": 20,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/possibleConstructorReturn": 22
    }
], 169: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        exports.availablefields = exports.Data = exports.instanceData = undefined;
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var instanceData = exports.instanceData = {};
        var Data = exports.Data = function Data(formID) {
            (0, _classCallCheck3.default)(this, Data);
            this.formData = {};
            this.formID = formID;
            this.layout = '';
            instanceData[formID] = this;
        };
        var availablefields = exports.availablefields = {};
    }, {
        "babel-runtime/helpers/classCallCheck": 17
    }
], 170: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        exports.optionFieldsRegEx = exports.optionFields = exports.filter = exports.empty = exports.remove = exports.defaultSubtypes = exports.instanceDom = undefined;
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var instanceDom = exports.instanceDom = {};
        var defaultSubtypes = exports.defaultSubtypes = {
            text: ['text', 'password', 'email', 'color', 'tel'],
            header: ['h1', 'h2', 'h3'],
            button: ['button', 'submit', 'reset'],
            paragraph: ['p', 'address', 'blockquote', 'canvas', 'output'],
            textarea: ['textarea', 'quill']
        };
        var remove = exports.remove = function remove(element) {
            if (element.parentNode) {
                element.parentNode.removeChild(element);
            }
        };
        var empty = exports.empty = function empty(element) {
            while (element.firstChild) {
                element.removeChild(element.firstChild);
            }
            return element;
        };
        var filter = exports.filter = function filter(elems, term) {
            var show = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
            var filteredElems = [];
            var toggle = ['none', 'block'];
            if (show) {
                toggle = toggle.reverse();
            }
            for (var i = elems.length - 1; i >= 0; i--) {
                var txt = elems[i].textContent.toLowerCase();
                if (txt.indexOf(term.toLowerCase()) !== -1) {
                    elems[i].style.display = toggle[0];
                    filteredElems.push(elems[i]);
                } else {
                    elems[i].style.display = toggle[1];
                }
            }
            return filteredElems;
        };
        var optionFields = exports.optionFields = ['select', 'checkbox-group', 'checkbox', 'radio-group', 'autocomplete'];
        var optionFieldsRegEx = exports.optionFieldsRegEx = new RegExp('(' + optionFields.join('|') + ')');
        var Dom = function Dom(formID) {
            (0, _classCallCheck3.default)(this, Dom);
            this.optionFields = optionFields;
            this.optionFieldsRegEx = optionFieldsRegEx;
            this.subtypes = defaultSubtypes;
            this.empty = empty;
            this.filter = filter;
            instanceDom[formID] = this;
            return instanceDom[formID];
        };
        exports.default = Dom;
    }, {
        "babel-runtime/helpers/classCallCheck": 17
    }
], 171: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });

        function createNewEvent(eventName) {
            var event = void 0;
            if (typeof Event === 'function') {
                event = new Event(eventName);
            } else {
                event = document.createEvent('Event');
                event.initEvent(eventName, true, true);
            }
            return event;
        }
        var events = {
            loaded: createNewEvent('loaded'),
            viewData: createNewEvent('viewData'),
            userDeclined: createNewEvent('userDeclined'),
            modalClosed: createNewEvent('modalClosed'),
            modalOpened: createNewEvent('modalOpened'),
            formSaved: createNewEvent('formSaved'),
            fieldAdded: createNewEvent('fieldAdded'),
            fieldRemoved: createNewEvent('fieldRemoved'),
            fieldRendered: createNewEvent('fieldRendered')
        };
        exports.default = events;
    }, {}
], 172: [

    function (require, module, exports) {
        'use strict';
        var _promise = require('babel-runtime/core-js/promise');
        var _promise2 = _interopRequireDefault(_promise);
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _regenerator = require('babel-runtime/regenerator');
        var _regenerator2 = _interopRequireDefault(_regenerator);
        var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
        var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
        var _assign = require('babel-runtime/core-js/object/assign');
        var _assign2 = _interopRequireDefault(_assign);
        var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
        var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
        var _keys = require('babel-runtime/core-js/object/keys');
        var _keys2 = _interopRequireDefault(_keys);
        require('babel-regenerator-runtime');
        var _dom = require('./dom');
        var _dom2 = _interopRequireDefault(_dom);
        var _data = require('./data');
        var _mi18n = require('mi18n');
        var _mi18n2 = _interopRequireDefault(_mi18n);
        var _utils = require('./utils');
        var _utils2 = _interopRequireDefault(_utils);
        var _events = require('./events');
        var _events2 = _interopRequireDefault(_events);
        var _layout = require('./layout');
        var _layout2 = _interopRequireDefault(_layout);
        var _helpers = require('./helpers');
        var _helpers2 = _interopRequireDefault(_helpers);
        var _config = require('./config');
        var _control = require('./control');
        var _control2 = _interopRequireDefault(_control);
        require('./control/index');
        var _custom2 = require('./control/custom');
        var _custom3 = _interopRequireDefault(_custom2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var instanceTime = new Date().getTime();
        var FormBuilder = function FormBuilder(opts, element) {
            var _this = this;
            var formBuilder = this;
            var i18n = _mi18n2.default.current;
            var formID = 'frmb-' + instanceTime++;
            var data = new _data.Data(formID);
            var d = new _dom2.default(formID);
            if (!opts.layout) {
                opts.layout = _layout2.default;
            }
            var layoutEngine = new opts.layout(opts.layoutTemplates, true);
            _control2.default.controlConfig = opts.controlConfig || {};
            var h = new _helpers2.default(formID, layoutEngine);
            var m = _utils2.default.markup;
            var originalOpts = opts;
            _control2.default.loadCustom(opts.controls);
            opts = h.processOptions(opts);
            if ((0, _keys2.default)(opts.fields).length) {
                _custom3.default.register(opts.templates, opts.fields);
            }
            var subtypes = _config.config.subtypes = h.processSubtypes(opts.subtypes);
            h.editorUI(formID);
            var $stage = $(d.stage);
            data.layout = h.editorLayout(opts.controlPosition);
            data.formID = formID;
            data.lastID = data.formID + '-fld-1';
            var controls = _control2.default.getRegistered();
            var customFields = _custom3.default.getRegistered();
            if (customFields) {
                $.merge(controls, customFields);
            }
            if (opts.sortableControls) {
                d.controls.classList.add('sort-enabled');
            }
            var $cbUL = $(d.controls);
            var controlList = [];
            var allControls = {};
            for (var i = 0; i < controls.length; i++) {
                var type = controls[i];
                var custom = _custom3.default.lookup(type);
                var controlClass = void 0;
                if (custom) {
                    controlClass = custom.class;
                } else {
                    custom = {};
                    controlClass = _control2.default.getClass(type);
                    if (!controlClass || !controlClass.active(type)) {
                        continue;
                    }
                }
                var icon = custom.icon || controlClass.icon(type);
                var label = custom.label || controlClass.label(type);
                var iconClassName = !icon ? custom.iconClassName || 'icon-' + type.replace(/-[\d]{4}$/, '') : '';
                if (icon) {
                    label = '<span class="control-icon">' + icon + '</span>' + label;
                }
                var newFieldControl = m('li', m('span', label), {
                    className: iconClassName + ' input-control input-control-' + i
                });
                newFieldControl.dataset.type = type;
                controlList.push(type);
                allControls[type] = newFieldControl;
            }
            if (opts.inputSets.length) {
                opts.inputSets.forEach(function (set, i) {
                    var name = set.name,
                        label = set.label,
                        icon = set.icon;
                    name = name || _utils2.default.makeClassName(label);
                    if (icon) {
                        label = '<span class="control-icon">' + icon + '</span>' + label;
                    }
                    var inputSet = m('li', label, {
                        className: 'input-set-control input-set-' + i
                    });
                    inputSet.dataset.type = name;
                    controlList.push(name);
                    allControls[set.name] = inputSet;
                });
            }
            h.orderFields(controlList).forEach(function (control) {
                if (allControls[control]) {
                    d.controls.appendChild(allControls[control]);
                }
            });
            $stage.sortable({
                cursor: 'move',
                opacity: 0.9,
                revert: 150,
                beforeStop: function beforeStop(evt, ui) {
                        return h.beforeStop.call(h, evt, ui);
                    },
                    start: function start(evt, ui) {
                        return h.startMoving.call(h, evt, ui);
                    },
                    stop: function stop(evt, ui) {
                        return h.stopMoving.call(h, evt, ui);
                    },
                    cancel: ['input', 'select', 'textarea', '.disabled-field', '.form-elements', '.btn', 'button'].join(', '),
                placeholder: 'frmb-placeholder'
            });
            $cbUL.sortable({
                helper: 'clone',
                opacity: 0.9,
                connectWith: $stage,
                cancel: '.fb-separator',
                cursor: 'move',
                scroll: false,
                placeholder: 'ui-state-highlight',
                start: function start(evt, ui) {
                        return h.startMoving.call(h, evt, ui);
                    },
                    stop: function stop(evt, ui) {
                        return h.stopMoving.call(h, evt, ui);
                    },
                    revert: 150,
                beforeStop: function beforeStop(evt, ui) {
                        return h.beforeStop.call(h, evt, ui);
                    },
                    distance: 3,
                update: function update(event, ui) {
                    if (h.doCancel) {
                        return false;
                    }
                    if (ui.item.parent()[0] === d.stage) {
                        h.doCancel = true;
                        processControl(ui.item);
                    } else {
                        h.setFieldOrder($cbUL);
                        h.doCancel = !opts.sortableControls;
                    }
                }
            });
            var processControl = function processControl(control) {
                if (control[0].classList.contains('input-set-control')) {
                    var inputSets = [];
                    var inputSet = opts.inputSets.find(function (set) {
                        return set.name === control[0].dataset.type;
                    });
                    if (inputSet && inputSet.showHeader) {
                        var header = {
                            type: 'header',
                            subtype: 'h2',
                            id: inputSet.name,
                            label: inputSet.label
                        };
                        inputSets.push(header);
                    }
                    inputSets.push.apply(inputSets, (0, _toConsumableArray3.default)(inputSet.fields));
                    inputSets.forEach(function (field) {
                        prepFieldVars(field, true);
                        if (h.stopIndex || h.stopIndex === 0) {
                            h.stopIndex++;
                        }
                    });
                } else {
                    prepFieldVars(control, true);
                }
            };
            d.editorWrap = m('div', null, {
                id: data.formID + '-form-wrap',
                className: 'form-wrap form-builder' + _utils2.default.mobileClass()
            });
            var $editorWrap = $(d.editorWrap);
            var cbWrap = m('div', d.controls, {
                id: data.formID + '-cb-wrap',
                className: 'cb-wrap ' + data.layout.controls
            });
            if (opts.showActionButtons) {
                var buttons = opts.actionButtons.map(function (btnData) {
                    if (btnData.id && opts.disabledActionButtons.indexOf(btnData.id) === -1) {
                        return h.processActionButtons(btnData);
                    }
                });
                var formActions = d.formActions = m('div', buttons, {
                    className: 'form-actions btn-group'
                });
                cbWrap.appendChild(formActions);
            }
            var stageWrap = m('div', [d.stage, cbWrap], {
                id: data.formID + '-stage-wrap',
                className: 'stage-wrap '
            });
            var mainWrap = m('div', [], {
                id: data.formID + '-main-wrap',
                className: 'main-wrap ' + data.layout.stage
            });
            mainWrap.appendChild(stageWrap);
            var attrWrap = m('div', [], {
                id: data.formID + '-attr-wrap',
                className: 'attr-wrap ' + data.layout.stage
            });
            $editorWrap.append(attrWrap ,mainWrap, cbWrap);
            if (element.type !== 'textarea') {
                $(element).append($editorWrap);
            } else {
                $(element).replaceWith($editorWrap);
            }
            var saveAndUpdate = _utils2.default.debounce(function (evt) {
                if (evt) {
                    if (evt.type === 'keyup' && evt.target.name === 'className') {
                        return false;
                    }
                    var $field = $(evt.target).closest('.form-field');
                    h.updatePreview($field);
                    h.save.call(h);
                }
            });
            var previewSelectors = ['.form-elements input', '.form-elements select', '.form-elements textarea'].join(', ');
            $stage.on('change blur keyup', previewSelectors, saveAndUpdate);
            $('li', d.controls).click(function (evt) {
                var $control = $(evt.target).closest('li');
                h.stopIndex = undefined;
                processControl($control);
                h.save.call(h);
            });
            var nonEditableFields = function nonEditableFields() {
                var cancelArray = [];
                var disabledField = function disabledField(type) {
                    return _utils2.default.markup('li', opts[type], {
                        className: 'disabled-field form-' + type
                    });
                };
                if (opts.prepend && !$('.disabled-field.form-prepend', d.stage).length) {
                    cancelArray.push(true);
                    $stage.prepend(disabledField('prepend'));
                }
                if (opts.append && !$('.disabled-field.form-.append', d.stage).length) {
                    cancelArray.push(true);
                    $stage.append(disabledField('append'));
                }
                h.disabledTT(d.stage);
                return cancelArray.some(function (elem) {
                    return elem === true;
                });
            };
            var prepFieldVars = function prepFieldVars($field) {
                var isNew = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                var field = {};
                if ($field instanceof jQuery) {
                    field.type = $field[0].dataset.type;
                    if (field.type) {
                        var _custom = _custom3.default.lookup(field.type);
                        if (_custom) {
                            field = (0, _assign2.default)({}, _custom);
                        } else {
                            var _controlClass = _control2.default.getClass(field.type);
                            field.label = _controlClass.label(field.type);
                        }
                    } else {
                        var attrs = $field[0].attributes;
                        if (!isNew) {
                            field.values = $field.children().map(function (index, elem) {
                                return {
                                    label: $(elem).text(),
                                    value: $(elem).attr('value'),
                                    selected: Boolean($(elem).attr('selected'))
                                };
                            });
                        }
                        for (var _i = attrs.length - 1; _i >= 0; _i--) {
                            field[attrs[_i].name] = attrs[_i].value;
                        }
                    }
                } else {
                    field = (0, _assign2.default)({}, $field);
                }
                if (!field.name) {
                    field.name = _utils2.default.nameAttr(field);
                }
                if (isNew && _utils2.default.inArray(field.type, ['text', 'number', 'file', 'date', 'select', 'textarea', 'autocomplete'])) {
                    field.className = field.className || 'layui-input';
                }
                var match = /(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(field.className);
                if (match) {
                    field.style = match[1];
                }
                appendNewField(field, isNew);
                if (isNew) {
                    setTimeout(function () {
                        return document.dispatchEvent(_events2.default.fieldAdded);
                    }, 10);
                }
                stageWrap.classList.remove('empty');
            };
            var loadFields = function loadFields(formData) {
                formData = h.getData(formData);
                if (formData && formData.length) {
                    for (var _i2 = 0; _i2 < formData.length; _i2++) {
                        var fieldData = _utils2.default.trimObj(formData[_i2]);
                        prepFieldVars(fieldData);
                    }
                    stageWrap.classList.remove('empty');
                } else if (opts.defaultFields && opts.defaultFields.length) {
                    opts.defaultFields.forEach(function (field) {
                        return prepFieldVars(field);
                    });
                    stageWrap.classList.remove('empty');
                } else if (!opts.prepend && !opts.append) {
                    stageWrap.classList.add('empty');
                    stageWrap.dataset.content = i18n.getStarted;
                }
                if (nonEditableFields()) {
                    stageWrap.classList.remove('empty');
                }
                h.save();
            };
            var fieldOptions = function fieldOptions(fieldData) {
                var type = fieldData.type,
                    values = fieldData.values,
                    name = fieldData.name;
                var optionActions = [m('a', i18n.addOption, {
                    className: 'add add-opt'
                })];
                var fieldOptions = [m('label', i18n.selectOptions, {
                    className: 'false-label'
                })];
                var isMultiple = fieldData.multiple || type === 'checkbox-group';
                var optionDataTemplate = function optionDataTemplate(label) {
                    var optionData = {
                        label: label,
                        value: _utils2.default.hyphenCase(label)
                    };
                    if (type !== 'autocomplete') {
                        optionData.selected = false;
                    }
                    return optionData;
                };
                if (!values || !values.length) {
                    var defaultOptCount = [1, 2, 3];
                    if (_utils2.default.inArray(type, ['checkbox-group', 'checkbox'])) {
                        defaultOptCount = [1];
                    }
                    values = defaultOptCount.map(function (index) {
                        var label = i18n.option + ' ' + index;
                        return optionDataTemplate(label);
                    });
                    var firstOption = values[0];
                    if (firstOption.hasOwnProperty('selected') && type !== 'radio-group') {
                        firstOption.selected = true;
                    }
                } else {
                    values.forEach(function (option) {
                        return (0, _assign2.default)({}, {
                            selected: false
                        }, option);
                    });
                }
                var optionActionsWrap = m('div', optionActions, {
                    className: 'option-actions'
                });
                var options = m('ol', values.map(function (option) {
                    return selectFieldOptions(name, option, isMultiple);
                }), {
                    className: 'sortable-options'
                });
                var optionsWrap = m('div', [options, optionActionsWrap], {
                    className: 'sortable-options-wrap'
                });
                fieldOptions.push(optionsWrap);
                return m('div', fieldOptions, {
                    className: 'form-group field-options'
                }).outerHTML;
            };
            var defaultFieldAttrs = function defaultFieldAttrs(type) {
                var defaultAttrs = ['required', 'label', 'description', 'placeholder', 'className', 'name', 'access', 'value'];
                var noValFields = ['header', 'paragraph', 'file', 'autocomplete'].concat(d.optionFields);
                var valueField = !_utils2.default.inArray(type, noValFields);
                var typeAttrsMap = {
                    autocomplete: defaultAttrs.concat(['options']),
                    button: ['label', 'subtype', 'style', 'className', 'name', 'value', 'access'],
                    checkbox: ['required', 'label', 'description', 'toggle', 'inline', 'className', 'name', 'access', 'other', 'options'],
                    text: defaultAttrs.concat(['subtype', 'maxlength']),
                    date: defaultAttrs,
                    file: defaultAttrs.concat(['subtype', 'multiple']),
                    header: ['label', 'subtype', 'className', 'access'],
                    hidden: ['name', 'value', 'access'],
                    paragraph: ['label', 'subtype', 'className', 'access'],
                    number: defaultAttrs.concat(['min', 'max', 'step']),
                    select: defaultAttrs.concat(['multiple', 'options']),
                    textarea: defaultAttrs.concat(['subtype', 'maxlength', 'rows'])
                };
                typeAttrsMap['checkbox-group'] = typeAttrsMap.checkbox;
                typeAttrsMap['radio-group'] = typeAttrsMap.checkbox;
                var typeAttrs = typeAttrsMap[type];
                if (type === 'radio-group') {
                    _utils2.default.remove('toggle', typeAttrs);
                }
                if (_utils2.default.inArray(type, ['header', 'paragraph', 'button'])) {
                    _utils2.default.remove('description', typeAttrs);
                }
                if (!valueField) {
                    _utils2.default.remove('value', typeAttrs);
                }
                return typeAttrs || defaultAttrs;
            };
            var advFields = function advFields(values) {
                var type = values.type;
                var advFields = [];
                var fieldAttrs = defaultFieldAttrs(type);
                var advFieldMap = {
                    required: function required() {
                            return requiredField(values);
                        },
                        toggle: function toggle() {
                            return boolAttribute('toggle', values, {
                                first: i18n.toggle
                            });
                        },
                        inline: function inline() {
                            var labels = {
                                first: i18n.inline,
                                second: _mi18n2.default.get('inlineDesc', type.replace('-group', ''))
                            };
                            return boolAttribute('inline', values, labels);
                        },
                        label: function label() {
                            return textAttribute('label', values);
                        },
                        description: function description() {
                            return textAttribute('description', values);
                        },
                        subtype: function subtype() {
                            return selectAttribute('subtype', values, subtypes[type]);
                        },
                        style: function style() {
                            return btnStyles(values.style);
                        },
                        placeholder: function placeholder() {
                            return textAttribute('placeholder', values);
                        },
                        rows: function rows() {
                            return numberAttribute('rows', values);
                        },
                        className: function className() {
                            return textAttribute('className', values);
                        },
                        name: function name() {
                            return textAttribute('name', values);
                        },
                        value: function value() {
                            return textAttribute('value', values);
                        },
                        maxlength: function maxlength() {
                            return numberAttribute('maxlength', values);
                        },
                        access: function access() {
                            var rolesDisplay = values.role ? 'style="display:block"' : '';
                            var availableRoles = ['<div class="available-roles" ' + rolesDisplay + '>'];
                            for (key in opts.roles) {
                                if (opts.roles.hasOwnProperty(key)) {
                                    var roleId = 'fld-' + data.lastID + '-roles-' + key;
                                    var cbAttrs = {
                                        type: 'checkbox',
                                        name: 'roles[]',
                                        value: key,
                                        id: roleId,
                                        className: 'roles-field'
                                    };
                                    if (_utils2.default.inArray(key, roles)) {
                                        cbAttrs.checked = 'checked';
                                    }
                                    availableRoles.push('<label for="' + roleId + '">');
                                    availableRoles.push(h.input(cbAttrs).outerHTML);
                                    availableRoles.push(' ' + opts.roles[key] + '</label>');
                                }
                            }
                            availableRoles.push('</div>');
                            var accessLabels = {
                                first: i18n.roles,
                                second: i18n.limitRole,
                                content: availableRoles.join('')
                            };
                            return boolAttribute('access', values, accessLabels);
                        },
                        other: function other() {
                            return boolAttribute('other', values, {
                                first: i18n.enableOther,
                                second: i18n.enableOtherMsg
                            });
                        },
                        options: function options() {
                            return fieldOptions(values);
                        }
                };
                var key = void 0;
                var roles = values.role !== undefined ? values.role.split(',') : [];
                var numAttrs = ['min', 'max', 'step'];
                if (type === 'number') {
                    numAttrs.forEach(function (numAttr) {
                        advFieldMap[numAttr] = function () {
                            return numberAttribute(numAttr, values);
                        };
                    });
                }
                if (type === 'file') {
                    advFieldMap['multiple'] = function () {
                        var labels = {
                            first: i18n.multipleFiles,
                            second: i18n.allowMultipleFiles
                        };
                        return boolAttribute('multiple', values, labels);
                    };
                }
                if (type === 'select') {
                    advFieldMap['multiple'] = function () {
                        return boolAttribute('multiple', values, {
                            first: ' ',
                            second: i18n.selectionsMessage
                        });
                    };
                }
                (0, _keys2.default)(fieldAttrs).forEach(function (index) {
                    var attr = fieldAttrs[index];
                    var useDefaultAttr = [true];
                    if (opts.typeUserDisabledAttrs[type]) {
                        var typeDisabledAttrs = opts.typeUserDisabledAttrs[type];
                        useDefaultAttr.push(!_utils2.default.inArray(attr, typeDisabledAttrs));
                    }
                    if (opts.typeUserAttrs[type]) {
                        var userAttrs = (0, _keys2.default)(opts.typeUserAttrs[type]);
                        useDefaultAttr.push(!_utils2.default.inArray(attr, userAttrs));
                    }
                    if (_utils2.default.inArray(attr, opts.disabledAttrs)) {
                        useDefaultAttr.push(false);
                    }
                    if (useDefaultAttr.every(function (use) {
                        return use === true;
                    })) {
                        advFields.push(advFieldMap[attr]());
                    }
                });
                if (opts.typeUserAttrs[type]) {
                    var customAttr = processTypeUserAttrs(opts.typeUserAttrs[type], values);
                    advFields.push(customAttr);
                }
                return advFields.join('');
            };

            function processTypeUserAttrs(typeUserAttr, values) {
                var advField = [];
                for (var attribute in typeUserAttr) {
                    if (typeUserAttr.hasOwnProperty(attribute)) {
                        var orig = i18n[attribute];
                        var tUA = typeUserAttr[attribute];
                        var origValue = tUA.value;
                        tUA.value = values[attribute] || tUA.value || '';
                        if (tUA.label) {
                            i18n[attribute] = tUA.label;
                        }
                        if (tUA.options) {
                            advField.push(selectUserAttrs(attribute, tUA));
                        } else {
                            advField.push(inputUserAttrs(attribute, tUA));
                        }
                        i18n[attribute] = orig;
                        tUA.value = origValue;
                    }
                }
                return advField.join('');
            }

            function inputUserAttrs(name, attrs) {
                var textAttrs = {
                    id: name + '-' + data.lastID,
                    title: attrs.description || attrs.label || name.toUpperCase(),
                    name: name,
                    type: attrs.type || 'text',
                    className: ['fld-' + name]
                };
                var label = '<label for="' + textAttrs.id + '">' + i18n[name] + '</label>';
                var optionInputs = ['checkbox', 'checkbox-group', 'radio-group'];
                if (!_utils2.default.inArray(textAttrs.type, optionInputs)) {
                    textAttrs.className.push('layui-input');
                }
                textAttrs = (0, _assign2.default)({}, attrs, textAttrs);
                var textInput = '<input ' + _utils2.default.attrString(textAttrs) + '>';
                var inputWrap = '<div class="input-wrap">' + textInput + '</div>';
                return '<div class="form-group ' + name + '-wrap">' + label + inputWrap + '</div>';
            }

            function selectUserAttrs(name, fieldData) {
                var optis = (0, _keys2.default)(fieldData.options).map(function (val) {
                    var attrs = {
                        value: val
                    };
                    if (val === fieldData.value) {
                        attrs.selected = null;
                    }
                    return m('option', fieldData.options[val], attrs).outerHTML;
                });
                var selectAttrs = {
                    id: name + '-' + data.lastID,
                    title: fieldData.description || fieldData.label || name.toUpperCase(),
                    name: name,
                    className: 'fld-' + name + ' layui-input'
                };
                var label = '<label for="' + selectAttrs.id + '">' + i18n[name] + '</label>';
                (0, _keys2.default)(fieldData).filter(function (prop) {
                    return !_utils2.default.inArray(prop, ['value', 'options', 'label']);
                }).forEach(function (attr) {
                    selectAttrs[attr] = fieldData[attr];
                });
                var select = m('select', optis, selectAttrs).outerHTML;
                var inputWrap = '<div class="input-wrap">' + select + '</div>';
                return '<div class="form-group ' + name + '-wrap">' + label + inputWrap + '</div>';
            }
            var boolAttribute = function boolAttribute(name, values, labels) {
                var label = function label(txt) {
                    return m('label', txt, {
                        for: name + '-' + data.lastID
                    }).outerHTML;
                };
                var cbAttrs = {
                    type: 'checkbox',
                    className: 'fld-' + name,
                    name: name,
                    id: name + '-' + data.lastID
                };
                if (values[name]) {
                    cbAttrs.checked = true;
                }
                var left = [];
                var right = [m('input', null, cbAttrs).outerHTML];
                if (labels.first) {
                    left.push(label(labels.first));
                }
                if (labels.second) {
                    right.push(' ', label(labels.second));
                }
                if (labels.content) {
                    right.push(labels.content);
                }
                right = m('div', right, {
                    className: 'input-wrap'
                }).outerHTML;
                return m('div', left.concat(right), {
                    className: 'form-group ' + name + '-wrap'
                }).outerHTML;
            };
            var btnStyles = function btnStyles(style) {
                var styleField = '';
                if (style === 'undefined') {
                    style = 'default';
                }
                var styleLabel = '<label>' + i18n.style + '</label>';
                styleField += h.input({
                    value: style || 'default',
                    type: 'hidden',
                    className: 'btn-style'
                }).outerHTML;
                styleField += '<div class="btn-group" role="group">';
                _config.styles.btn.forEach(function (btnStyle) {
                    var classList = ['btn-xs', 'btn', 'btn-' + btnStyle];
                    if (style === btnStyle) {
                        classList.push('selected');
                    }
                    var btn = m('button', _mi18n2.default.get('styles.btn.' + btnStyle), {
                        value: btnStyle,
                        type: 'button',
                        className: classList.join(' ')
                    }).outerHTML;
                    styleField += btn;
                });
                styleField += '</div>';
                styleField = m('div', [styleLabel, styleField], {
                    className: 'form-group style-wrap'
                });
                return styleField.outerHTML;
            };
            var numberAttribute = function numberAttribute(attribute, values) {
                var attrVal = values[attribute];
                var attrLabel = i18n[attribute] || attribute;
                var placeholder = i18n['placeholder.' + attribute];
                var inputConfig = {
                    type: 'number',
                    value: attrVal,
                    name: attribute,
                    min: '0',
                    placeholder: placeholder,
                    className: 'fld-' + attribute + ' layui-input',
                    id: attribute + '-' + data.lastID
                };
                var numberAttribute = h.input(_utils2.default.trimObj(inputConfig)).outerHTML;
                var inputWrap = '<div class="input-wrap">' + numberAttribute + '</div>';
                var inputLabel = '<label for="' + inputConfig.id + '">' + attrLabel + '</label>';
                return m('div', [inputLabel, inputWrap], {
                    className: 'form-group ' + attribute + '-wrap'
                }).outerHTML;
            };
            var selectAttribute = function selectAttribute(attribute, values, optionData) {
                var selectOptions = optionData.map(function (option, i) {
                    var optionAttrs = (0, _assign2.default)({
                        label: i18n.option + ' ' + i,
                        value: undefined
                    }, option);
                    if (option.value === values[attribute]) {
                        optionAttrs.selected = true;
                    }
                    optionAttrs = _utils2.default.trimObj(optionAttrs);
                    return m('option', optionAttrs.label, optionAttrs);
                });
                var selectAttrs = {
                    id: attribute + '-' + data.lastID,
                    name: attribute,
                    className: 'fld-' + attribute + ' layui-input'
                };
                var labelText = i18n[attribute] || _utils2.default.capitalize(attribute);
                var label = m('label', labelText, {
                    for: selectAttrs.id
                });
                var select = m('select', selectOptions, selectAttrs);
                var inputWrap = m('div', select, {
                    className: 'input-wrap'
                });
                var attrWrap = m('div', [label, inputWrap], {
                    className: 'form-group ' + selectAttrs.name + '-wrap'
                });
                return attrWrap.outerHTML;
            };
            var textAttribute = function textAttribute(attribute, values) {
                var textArea = ['paragraph'];
                var attrVal = values[attribute] || '';
                var attrLabel = i18n[attribute];
                if (attribute === 'label') {
                    if (_utils2.default.inArray(values.type, textArea)) {
                        attrLabel = i18n.content;
                    } else {
                        attrVal = _utils2.default.parsedHtml(values[attribute]);
                    }
                }
                var placeholder = i18n['placeholder.' + attribute] || '';
                var attributefield = '';
                var noMakeAttr = [];
                if (!noMakeAttr.some(function (elem) {
                    return elem === true;
                })) {
                    var inputConfig = {
                        name: attribute,
                        placeholder: placeholder,
                        className: 'fld-' + attribute + ' layui-input',
                        id: attribute + '-' + data.lastID
                    };
                    var attributeLabel = m('label', attrLabel, {
                        for: inputConfig.id
                    }).outerHTML;
                    if (attribute === 'label') {
                        inputConfig.contenteditable = true;
                        attributefield += m('div', attrVal, inputConfig).outerHTML;
                    } else {
                        inputConfig.value = attrVal;
                        inputConfig.type = 'text';
                        attributefield += '<input ' + _utils2.default.attrString(inputConfig) + '>';
                    }
                    var inputWrap = '<div class="input-wrap">' + attributefield + '</div>';
                    var visibility = 'block';
                    if (attribute === 'value') {
                        visibility = values.subtype && values.subtype === 'quill' && 'none';
                    }
                    attributefield = m('div', [attributeLabel, inputWrap], {
                        className: 'form-group ' + attribute + '-wrap',
                        style: 'display: ' + visibility
                    });
                }
                return attributefield.outerHTML;
            };
            var requiredField = function requiredField(fieldData) {
                var type = fieldData.type;
                var noRequire = ['header', 'paragraph', 'button'];
                var noMake = [];
                var requireField = '';
                if (_utils2.default.inArray(type, noRequire)) {
                    noMake.push(true);
                }
                if (!noMake.some(function (elem) {
                    return elem === true;
                })) {
                    requireField = boolAttribute('required', fieldData, {
                        first: i18n.required
                    });
                }
                return requireField;
            };
            var appendNewField = function appendNewField(values) {
                var isNew = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
                var type = values.type || 'text';
                var label = values.label || i18n[type] || i18n.label;
                var disabledFieldButtons = opts.disabledFieldButtons[type] || values.disabledFieldButtons;
                var fieldButtons = [m('a', null, {
                    type: 'remove',
                    id: 'del_' + data.lastID,
                    className: 'del-button btn icon-cancel delete-confirm',
                    title: i18n.removeMessage
                }), m('a', null, {
                    type: 'edit',
                    id: data.lastID + '-edit',
                    className: 'toggle-form btn icon-pencil',
                    title: i18n.hide
                }), m('a', null, {
                    type: 'copy',
                    id: data.lastID + '-copy',
                    className: 'copy-button btn icon-copy',
                    title: i18n.copyButtonTooltip
                })];
                if (disabledFieldButtons && Array.isArray(disabledFieldButtons)) {
                    fieldButtons = fieldButtons.filter(function (btnData) {
                        return !_utils2.default.inArray(btnData.type, disabledFieldButtons);
                    });
                }
                var liContents = [m('div', fieldButtons, {
                    className: 'field-actions'
                })];
                liContents.push(m('label', _utils2.default.parsedHtml(label), {
                    className: 'field-label'
                }));
                liContents.push(m('span', ' *', {
                    className: 'required-asterisk',
                    style: values.required ? 'display:inline' : ''
                }));
                var descAttrs = {
                    className: 'tooltip-element',
                    tooltip: values.description,
                    style: values.description ? 'display:inline-block' : 'display:none'
                };
                liContents.push(m('span', '?', descAttrs));
                liContents.push(m('div', '', {
                    className: 'prev-holder'
                }));
                var formElements = m('div', [advFields(values), m('a', i18n.close, {
                    className: 'close-field'
                })], {
                    className: 'form-elements'
                });
                liContents.push(m('div', formElements, {
                    id: data.lastID + '-holder',
                    className: 'frm-holder'
                }));
                var field = m('li', liContents, {
                    class: type + '-field form-field',
                    type: type,
                    id: data.lastID
                });
                var $li = $(field);
                $li.data('fieldData', {
                    attrs: values
                });
                if (typeof h.stopIndex !== 'undefined') {
                    $('> li', d.stage).eq(h.stopIndex).before($li);
                } else {
                    $stage.append($li);
                }
                $('.sortable-options', $li).sortable({
                    update: function update() {
                        return h.updatePreview($li);
                    }
                });
                h.updatePreview($li);
                if (opts.typeUserEvents[type] && opts.typeUserEvents[type].onadd) {
                    opts.typeUserEvents[type].onadd(field);
                }
                if (opts.editOnAdd && isNew) {
                    h.closeAllEdit();
                    h.toggleEdit(data.lastID, false);
                }
                data.lastID = h.incrementId(data.lastID);
            };
            var selectFieldOptions = function selectFieldOptions(name, optionData, multipleSelect) {
                var optionInputType = {
                    selected: multipleSelect ? 'checkbox' : 'radio'
                };
                var optionDataOrder = ['value', 'label', 'selected'];
                var optionInputs = [];
                var optionTemplate = {
                    selected: false,
                    label: '',
                    value: ''
                };
                optionData = (0, _assign2.default)(optionTemplate, optionData);
                for (var _i3 = optionDataOrder.length - 1; _i3 >= 0; _i3--) {
                    var prop = optionDataOrder[_i3];
                    if (optionData.hasOwnProperty(prop)) {
                        var attrs = {
                            type: optionInputType[prop] || 'text',
                            className: 'option-' + prop,
                            value: optionData[prop],
                            name: name + '-option'
                        };
                        attrs.placeholder = i18n['placeholder.' + prop] || '';
                        if (prop === 'selected' && optionData.selected === true) {
                            attrs.checked = optionData.selected;
                        }
                        optionInputs.push(m('input', null, attrs));
                    }
                }
                var removeAttrs = {
                    className: 'remove btn',
                    title: i18n.removeMessage
                };
                optionInputs.push(_utils2.default.markup('a', i18n.remove, removeAttrs));
                var field = _utils2.default.markup('li', optionInputs);
                return field.outerHTML;
            };
            var cloneItem = function cloneItem(currentItem) {
                var currentId = currentItem.attr('id');
                var type = currentItem.attr('type');
                var ts = new Date().getTime();
                var cloneName = type + '-' + ts;
                var $clone = currentItem.clone();
                $('.fld-name', $clone).val(cloneName);
                $clone.find('[id]').each(function (i, elem) {
                    elem.id = elem.id.replace(currentId, data.lastID);
                });
                $clone.find('[for]').each(function (index, elem) {
                    var curId = elem.getAttribute('for');
                    var newForId = curId.replace(currentId, data.lastID);
                    elem.setAttribute('for', newForId);
                });
                $clone.attr('id', data.lastID);
                $clone.attr('name', cloneName);
                $clone.addClass('cloned');
                $('.sortable-options', $clone).sortable();
                if (opts.typeUserEvents[type] && opts.typeUserEvents[type].onclone) {
                    opts.typeUserEvents[type].onclone($clone[0]);
                }
                data.lastID = h.incrementId(data.lastID);
                return $clone;
            };
            $stage.on('click touchstart', '.remove', function (e) {
                var $field = $(e.target).parents('.form-field:eq(0)');
                var field = $field[0];
                var type = field.getAttribute('type');
                var $option = $(e.target.parentElement);
                e.preventDefault();
                var options = field.querySelector('.sortable-options');
                var optionsCount = options.childNodes.length;
                if (optionsCount <= 2 && !type.includes('checkbox')) {
                    opts.notify.error('Error: ' + i18n.minOptionMessage);
                } else {
                    $option.slideUp('250', function () {
                        $option.remove();
                        h.updatePreview($field);
                        h.save.call(h);
                    });
                }
            });
            $stage.on('touchstart', 'input', function (e) {
                var $input = $(_this);
                if (e.handled !== true) {
                    if ($input.attr('type') === 'checkbox') {
                        $input.trigger('click');
                    } else {
                        $input.focus();
                        var fieldVal = $input.val();
                        $input.val(fieldVal);
                    }
                } else {
                    return false;
                }
            });
            $stage.on('click touchstart', '.toggle-form, .close-field', function (e) {
                e.stopPropagation();
                e.preventDefault();
                if (e.handled !== true) {
                    var targetID = $(e.target).parents('.form-field:eq(0)').attr('id');
                    h.toggleEdit(targetID);
                    e.handled = true;
                } else {
                    return false;
                }
            });
            $stage.on('dblclick', 'li.form-field, .field-label', function (e) {
                if (e.target.tagName.toLowerCase() === 'input' || e.target.contentEditable) {
                    return;
                }
                e.stopPropagation();
                e.preventDefault();
                if (e.handled !== true) {
                    var targetID = e.target.tagName == 'li' ? $(e.target).attr('id') : $(e.target).closest('li.form-field').attr('id');
                    h.toggleEdit(targetID);
                    e.handled = true;
                }
            });
            $stage.on('change', '[name="subtype"]', function (e) {
                var $field = $(e.target).closest('li.form-field');
                var $valWrap = $('.value-wrap', $field);
                $valWrap.toggle(e.target.value !== 'quill');
            });
            var stageOnChangeSelectors = ['.prev-holder input', '.prev-holder select', '.prev-holder textarea'];
            $stage.on('change', stageOnChangeSelectors.join(', '), function (e) {
                var prevOptions = void 0;
                if (e.target.classList.contains('other-option')) {
                    return;
                }
                var field = _utils2.default.closest(e.target, '.form-field');
                var optionTypes = ['select', 'checkbox-group', 'radio-group'];
                if (_utils2.default.inArray(field.type, optionTypes)) {
                    var options = field.getElementsByClassName('option-value');
                    if (field.type === 'select') {
                        _utils2.default.forEach(options, function (i) {
                            var selectedOption = options[i].parentElement.childNodes[0];
                            selectedOption.checked = e.target.value === options[i].value;
                        });
                    } else {
                        prevOptions = document.getElementsByName(e.target.name);
                        _utils2.default.forEach(prevOptions, function (i) {
                            var selectedOption = options[i].parentElement.childNodes[0];
                            selectedOption.checked = prevOptions[i].checked;
                        });
                    }
                } else {
                    var fieldVal = document.getElementById('value-' + field.id);
                    if (fieldVal) {
                        fieldVal.value = e.target.value;
                    }
                }
                h.save.call(h);
            });
            _utils2.default.addEventListeners(d.stage, 'keyup change', function (e) {
                if (!e.target.classList.contains('fld-label')) return;
                var value = e.target.value || e.target.innerHTML;
                var label = _utils2.default.closest(e.target, '.form-field').querySelector('.field-label');
                label.innerHTML = _utils2.default.parsedHtml(value);
            });
            $stage.on('keyup', 'input.error', function (e) {
                $(e.target).removeClass('error');
            });
            $stage.on('keyup', 'input[name="description"]', function (e) {
                var $field = $(e.target).parents('.form-field:eq(0)');
                var closestToolTip = $('.tooltip-element', $field);
                var ttVal = $(e.target).val();
                if (ttVal !== '') {
                    if (!closestToolTip.length) {
                        var tt = '<span class="tooltip-element" tooltip="' + ttVal + '">?</span>';
                        $('.field-label', $field).after(tt);
                    } else {
                        closestToolTip.attr('tooltip', ttVal).css('display', 'inline-block');
                    }
                } else {
                    if (closestToolTip.length) {
                        closestToolTip.css('display', 'none');
                    }
                }
            });
            $stage.on('change', '.fld-multiple', function (e) {
                var newType = e.target.checked ? 'checkbox' : 'radio';
                var $options = $('.option-selected', $(e.target).closest('.form-elements'));
                $options.each(function (i) {
                    return $options[i].type = newType;
                });
                return newType;
            });
            $stage.on('blur', 'input.fld-name', function (e) {
                e.target.value = _utils2.default.safename(e.target.value);
                if (e.target.value === '') {
                    $(e.target).addClass('field-error').attr('placeholder', i18n.cannotBeEmpty);
                } else {
                    $(e.target).removeClass('field-error');
                }
            });
            $stage.on('blur', 'input.fld-maxlength', function (e) {
                e.target.value = _utils2.default.forceNumber(e.target.value);
            });
            $stage.on('click touchstart', '.icon-copy', function (e) {
                e.preventDefault();
                var currentItem = $(e.target).parent().parent('li');
                var $clone = cloneItem(currentItem);
                $clone.insertAfter(currentItem);
                h.updatePreview($clone);
                h.save.call(h);
            });
            $stage.on('click touchstart', '.delete-confirm', function (e) {
                e.preventDefault();
                var buttonPosition = e.target.getBoundingClientRect();
                var bodyRect = document.body.getBoundingClientRect();
                var coords = {
                    pageX: buttonPosition.left + buttonPosition.width / 2,
                    pageY: buttonPosition.top - bodyRect.top - 12
                };
                var deleteID = $(e.target).parents('.form-field:eq(0)').attr('id');
                var $field = $(document.getElementById(deleteID));
                document.addEventListener('modalClosed', function () {
                    $field.removeClass('deleting');
                }, false);
                if (opts.fieldRemoveWarn) {
                    var warnH3 = _utils2.default.markup('h3', i18n.warning);
                    var warnMessage = _utils2.default.markup('p', i18n.fieldRemoveWarning);
                    h.confirm([warnH3, warnMessage], function () {
                        return h.removeField(deleteID);
                    }, coords);
                    $field.addClass('deleting');
                } else {
                    h.removeField(deleteID);
                }
            });
            $stage.on('click', '.style-wrap button', function (e) {
                var $button = $(e.target);
                var styleVal = $button.val();
                var $btnStyle = $button.parent().prev('.btn-style');
                $btnStyle.val(styleVal);
                $button.siblings('.btn').removeClass('selected');
                $button.addClass('selected');
                h.updatePreview($btnStyle.closest('.form-field'));
                h.save.call(h);
            });
            $stage.on('click', '.fld-required', function (e) {
                $(e.target).closest('.form-field').find('.required-asterisk').toggle();
            });
            $stage.on('click', 'input.fld-access', function (e) {
                var roles = $(e.target).closest('.form-field').find('.available-roles');
                var enableRolesCB = $(e.target);
                roles.slideToggle(250, function () {
                    if (!enableRolesCB.is(':checked')) {
                        $('input[type=checkbox]', roles).removeAttr('checked');
                    }
                });
            });
            $stage.on('click', '.add-opt', function (e) {
                e.preventDefault();
                var $optionWrap = $(e.target).closest('.field-options');
                var $multiple = $('[name="multiple"]', $optionWrap);
                var $firstOption = $('.option-selected:eq(0)', $optionWrap);
                var isMultiple = false;
                if ($multiple.length) {
                    isMultiple = $multiple.prop('checked');
                } else {
                    isMultiple = $firstOption.attr('type') === 'checkbox';
                }
                var name = $firstOption.attr('name');
                $('.sortable-options', $optionWrap).append(selectFieldOptions(name, false, isMultiple));
            });
            $stage.on('mouseover mouseout', '.remove, .del-button', function (e) {
                return $(e.target).closest('li').toggleClass('delete');
            });
            loadFields();
            $stage.css('min-height', $cbUL.height());
            if (opts.stickyControls.enable) {
                h.stickyControls($stage);
            }
            if (opts.disableInjectedStyle) {
                var styleTags = document.getElementsByClassName('formBuilder-injected-style');
                _utils2.default.forEach(styleTags, function (i) {
                    return (0, _dom.remove)(styleTags[i]);
                });
            }
            document.dispatchEvent(_events2.default.loaded);
            formBuilder.actions = {
                clearFields: function clearFields(animate) {
                        return h.removeAllFields(d.stage, animate);
                    },
                    showData: h.showData.bind(h),
                save: h.save.bind(h),
                addField: function addField(field, index) {
                        h.stopIndex = data.formData.length ? index : undefined;
                        prepFieldVars(field);
                    },
                    removeField: h.removeField.bind(h),
                getData: h.getFormData.bind(h),
                setData: function setData(formData) {
                        h.stopIndex = undefined;
                        h.removeAllFields(d.stage, false);
                        loadFields(formData);
                        h.save.call(h);
                    },
                    setLang: function () {
                        var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(locale) {
                            var formBuilder;
                            return _regenerator2.default.wrap(function _callee$(_context) {
                                while (1) {
                                    switch (_context.prev = _context.next) {
                                    case 0:
                                        _context.next = 2;
                                        return _mi18n2.default.setCurrent.call(_mi18n2.default, locale);
                                    case 2:
                                        d.empty(element);
                                        formBuilder = new FormBuilder(originalOpts, element);
                                        $(element).data('formBuilder', formBuilder);
                                    case 5:
                                    case 'end':
                                        return _context.stop();
                                    }
                                }
                            }, _callee, _this);
                        }));
                        return function setLang(_x3) {
                            return _ref.apply(this, arguments);
                        };
                    }()
            };
            return formBuilder;
        };
        (function ($) {
            $.fn.formBuilder = function (options) {
                if (!options) {
                    options = {};
                }
                var elems = this;
                var _$$extend = $.extend({}, _config.defaultOptions, options, true),
                    i18n = _$$extend.i18n,
                    opts = (0, _objectWithoutProperties3.default)(_$$extend, ['i18n']);
                _config.config.opts = opts;
                var i18nOpts = $.extend({}, _config.defaultI18n, i18n, true);
                var instance = {
                    actions: {
                        getData: null,
                        setData: null,
                        save: null,
                        showData: null,
                        setLang: null,
                        addField: null,
                        removeField: null,
                        clearFields: null
                    },
                    get formData() {
                        return instance.actions.getData('json');
                    },
                    promise: new _promise2.default(function (resolve, reject) {
                        _mi18n2.default.init(i18nOpts).then(function () {
                            elems.each(function (i) {
                                var formBuilder = new FormBuilder(opts, elems[i]);
                                $(elems[i]).data('formBuilder', formBuilder);
                                instance.actions = formBuilder.actions;
                            });
                            delete instance.promise;
                            resolve(instance);
                        }).catch(console.error);
                    })
                };
                return instance;
            };
        })(jQuery);
    }, {
        "./config": 155,
        "./control": 156,
        "./control/custom": 159,
        "./control/index": 162,
        "./data": 169,
        "./dom": 170,
        "./events": 171,
        "./helpers": 173,
        "./layout": 174,
        "./utils": 175,
        "babel-regenerator-runtime": 1,
        "babel-runtime/core-js/object/assign": 6,
        "babel-runtime/core-js/object/keys": 11,
        "babel-runtime/core-js/promise": 13,
        "babel-runtime/helpers/asyncToGenerator": 16,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/toConsumableArray": 24,
        "babel-runtime/regenerator": 26,
        "mi18n": 151
    }
], 173: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _getIterator2 = require('babel-runtime/core-js/get-iterator');
        var _getIterator3 = _interopRequireDefault(_getIterator2);
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _assign = require('babel-runtime/core-js/object/assign');
        var _assign2 = _interopRequireDefault(_assign);
        var _keys = require('babel-runtime/core-js/object/keys');
        var _keys2 = _interopRequireDefault(_keys);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _dom = require('./dom');
        var _data = require('./data');
        var _utils = require('./utils');
        var _utils2 = _interopRequireDefault(_utils);
        var _events = require('./events');
        var _events2 = _interopRequireDefault(_events);
        var _mi18n = require('mi18n');
        var _mi18n2 = _interopRequireDefault(_mi18n);
        var _config = require('./config');
        var _control = require('./control');
        var _control2 = _interopRequireDefault(_control);
        var _custom = require('./control/custom');
        var _custom2 = _interopRequireDefault(_custom);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var m = _utils2.default.markup;
        var Helpers = function () {
            function Helpers(formID, layout) {
                    (0, _classCallCheck3.default)(this, Helpers);
                    this.data = _data.instanceData[formID];
                    this.d = _dom.instanceDom[formID];
                    this.doCancel = false;
                    this.layout = layout;
                }
                (0, _createClass3.default)(Helpers, [{
                    key: 'startMoving',
                    value: function startMoving(event, ui) {
                        ui.item.show().addClass('moving');
                        this.doCancel = true;
                        this.from = ui.item.parent();
                    }
                }, {
                    key: 'stopMoving',
                    value: function stopMoving(event, ui) {
                        var _this = this;
                        ui.item.removeClass('moving');
                        if (_this.doCancel) {
                            if (ui.sender) {
                                $(ui.sender).sortable('cancel');
                            }
                            this.from.sortable('cancel');
                        }
                        _this.save();
                        _this.doCancel = false;
                    }
                }, {
                    key: 'beforeStop',
                    value: function beforeStop(event, ui) {
                        var _this = this;
                        var opts = _config.config.opts;
                        var form = _this.d.stage;
                        var lastIndex = form.childNodes.length - 1;
                        var cancelArray = [];
                        _this.stopIndex = ui.placeholder.index() - 1;
                        if (!opts.sortableControls && ui.item.parent().hasClass('frmb-control')) {
                            cancelArray.push(true);
                        }
                        if (opts.prepend) {
                            cancelArray.push(_this.stopIndex === 0);
                        }
                        if (opts.append) {
                            cancelArray.push(_this.stopIndex + 1 === lastIndex);
                        }
                        _this.doCancel = cancelArray.some(function (elem) {
                            return elem === true;
                        });
                    }
                }, {
                    key: 'getTypes',
                    value: function getTypes($field) {
                        var types = {
                            type: $field.attr('type')
                        };
                        var subtype = $('.fld-subtype', $field).val();
                        if (subtype !== types.type) {
                            types.subtype = subtype;
                        }
                        return types;
                    }
                }, {
                    key: 'fieldOptionData',
                    value: function fieldOptionData(field) {
                        var options = [];
                        var $options = $('.sortable-options li', field);
                        $options.each(function (i) {
                            var $option = $($options[i]);
                            var selected = $('.option-selected', $option).is(':checked');
                            var attrs = {
                                label: $('.option-label', $option).val(),
                                value: $('.option-value', $option).val()
                            };
                            if (selected) {
                                attrs.selected = selected;
                            }
                            options.push(attrs);
                        });
                        return options;
                    }
                }, {
                    key: 'xmlSave',
                    value: function xmlSave(form) {
                        var formData = this.prepData(form);
                        var xml = ['<form-template>\n\t<fields>'];
                        _utils2.default.forEach(formData, function (fieldIndex, field) {
                            var fieldContent = null;
                            var optionFields = _dom.optionFieldsRegEx;
                            if (field.type.match(optionFields)) {
                                var fieldOptions = field.values;
                                var options = [];
                                for (var i = 0; i < fieldOptions.length; i++) {
                                    var oData = fieldOptions[i];
                                    var option = m('option', oData.label, oData).outerHTML;
                                    options.push('\n\t\t\t' + option);
                                }
                                options.push('\n\t\t');
                                fieldContent = options.join('');
                                delete field.values;
                            }
                            var xmlField = m('field', fieldContent, field);
                            xml.push('\n\t\t' + xmlField.outerHTML);
                        });
                        xml.push('\n\t</fields>\n</form-template>');
                        return xml.join('');
                    }
                }, {
                    key: 'prepData',
                    value: function prepData(form) {
                        var formData = [];
                        var d = this.d;
                        var _this = this;
                        if (form.childNodes.length !== 0) {
                            _utils2.default.forEach(form.childNodes, function (index, field) {
                                var $field = $(field);
                                if (!$field.hasClass('disabled-field')) {
                                    var fieldData = _this.getTypes($field);
                                    var $roleInputs = $('.roles-field:checked', field);
                                    var roleVals = $roleInputs.map(function (index) {
                                        return $roleInputs[index].value;
                                    }).get();
                                    _this.setAttrVals(field, fieldData);
                                    if (fieldData.subtype) {
                                        if (fieldData.subtype === 'quill') {
                                            var id = fieldData.name + '-preview';
                                            if (window.fbEditors.quill[id]) {
                                                var instance = window.fbEditors.quill[id].instance;
                                                var data = instance.getContents();
                                                fieldData.value = window.JSON.stringify(data.ops);
                                            }
                                        } else if (fieldData.subtype === 'tinymce' && window.tinymce) {
                                            var _id = fieldData.name + '-preview';
                                            if (window.tinymce.editors[_id]) {
                                                var editor = window.tinymce.editors[_id];
                                                fieldData.value = editor.getContent();
                                            }
                                        }
                                    }
                                    if (roleVals.length) {
                                        fieldData.role = roleVals.join(',');
                                    }
                                    fieldData.className = fieldData.className || fieldData.class;
                                    if (fieldData.className) {
                                        var match = /(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(fieldData.className);
                                        if (match) {
                                            fieldData.style = match[1];
                                        }
                                    }
                                    fieldData = _utils2.default.trimObj(fieldData);
                                    var multipleField = fieldData.type && fieldData.type.match(d.optionFieldsRegEx);
                                    if (multipleField) {
                                        fieldData.values = _this.fieldOptionData($field);
                                    }
                                    formData.push(fieldData);
                                }
                            });
                        }
                        return formData;
                    }
                }, {
                    key: 'getData',
                    value: function getData(formData) {
                        var data = this.data;
                        if (!formData) {
                            formData = _config.config.opts.formData;
                        }
                        if (!formData) {
                            return false;
                        }
                        var setData = {
                            xml: function xml(formData) {
                                    return _utils2.default.parseXML(formData);
                                },
                                json: function json(formData) {
                                    return window.JSON.parse(formData);
                                }
                        };
                        data.formData = setData[_config.config.opts.dataType](formData) || [];
                        return data.formData;
                    }
                }, {
                    key: 'save',
                    value: function save(stage) {
                        var _this = this;
                        var data = this.data;
                        if (!stage) {
                            stage = this.d.stage;
                        }
                        var doSave = {
                            xml: function xml() {
                                    return _this.xmlSave(stage);
                                },
                                json: function json() {
                                    return window.JSON.stringify(_this.prepData(stage), null, '\t');
                                }
                        };
                        data.formData = doSave[_config.config.opts.dataType](stage);
                        document.dispatchEvent(_events2.default.formSaved);
                        return data.formData;
                    }
                }, {
                    key: 'incrementId',
                    value: function incrementId(id) {
                        var split = id.lastIndexOf('-');
                        var newFieldNumber = parseInt(id.substring(split + 1)) + 1;
                        var baseString = id.substring(0, split);
                        return baseString + '-' + newFieldNumber;
                    }
                }, {
                    key: 'setAttrVals',
                    value: function setAttrVals(field, fieldData) {
                        var attrs = field.querySelectorAll('[class*="fld-"]');
                        _utils2.default.forEach(attrs, function (index) {
                            var attr = attrs[index];
                            var value = void 0;
                            var name = _utils2.default.camelCase(attr.getAttribute('name'));
                            if (attr.attributes['contenteditable']) {
                                value = attr.innerHTML;
                            } else if (attr.type === 'checkbox') {
                                value = attr.checked;
                            } else {
                                value = attr.value;
                            }
                            fieldData[name] = value;
                        });
                    }
                }, {
                    key: 'updatePreview',
                    value: function updatePreview($field) {
                        console.info($field);
                        var _this = this;
                        var d = this.d;
                        var fieldClass = $field.attr('class');
                        var field = $field[0];
                        if (fieldClass.indexOf('input-control') !== -1) {
                            return;
                        }
                        var fieldType = $field.attr('type');
                        var $prevHolder = $('.prev-holder', field);
                        var previewData = {
                            type: fieldType
                        };
                        var preview = void 0;
                        _this.setAttrVals(field, previewData);
                        var style = $('.btn-style', field).val();
                        if (style) {
                            previewData.style = style;
                        }
                        if (fieldType.match(d.optionFieldsRegEx)) {
                            previewData.values = [];
                            previewData.multiple = $('[name="multiple"]', field).is(':checked');
                            $('.sortable-options li', field).each(function (i, $option) {
                                var option = {};
                                option.selected = $('.option-selected', $option).is(':checked');
                                option.value = $('.option-value', $option).val();
                                option.label = $('.option-label', $option).val();
                                previewData.values.push(option);
                            });
                        }
                        previewData = _utils2.default.trimObj(previewData);
                        previewData.className = _this.classNames(field, previewData);
                        $('.fld-className', field).val(previewData.className);
                        $field.data('fieldData', previewData);
                        var custom = _custom2.default.lookup(previewData.type);
                        var controlClass = custom ? custom.class : _control2.default.getClass(previewData.type, previewData.subtype);
                        preview = this.layout.build(controlClass, previewData);
                        (0, _dom.empty)($prevHolder[0]);
                        $prevHolder[0].appendChild(preview);
                        preview.dispatchEvent(_events2.default.fieldRendered);
                    }
                }, {
                    key: 'disabledTT',
                    value: function disabledTT(stage) {
                        var move = function move(e, elem) {
                            var fieldOffset = elem.field.getBoundingClientRect();
                            var x = e.clientX - fieldOffset.left - 21;
                            var y = e.clientY - fieldOffset.top - elem.tt.offsetHeight - 12;
                            elem.tt.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
                        };
                        var disabledFields = stage.querySelectorAll('.disabled-field');
                        _utils2.default.forEach(disabledFields, function (index) {
                            var field = disabledFields[index];
                            var title = _mi18n2.default.get('fieldNonEditable');
                            if (title) {
                                var tt = _utils2.default.markup('p', title, {
                                    className: 'frmb-tt'
                                });
                                field.appendChild(tt);
                                field.addEventListener('mousemove', function (e) {
                                    return move(e, {
                                        tt: tt,
                                        field: field
                                    });
                                });
                            }
                        });
                    }
                }, {
                    key: 'classNames',
                    value: function classNames(field, previewData) {
                        var className = field.querySelector('.fld-className');
                        if (!className) {
                            return;
                        }
                        var i = void 0;
                        var type = previewData.type;
                        var style = previewData.style;
                        var classes = className.value.split(' ');
                        var types = {
                            button: 'btn',
                            submit: 'btn'
                        };
                        var primaryType = types[type];
                        if (primaryType) {
                            if (style) {
                                for (i = 0; i < classes.length; i++) {
                                    var re = new RegExp('(?:^|s)' + primaryType + '-(.*?)(?:s|$)+', 'g');
                                    var match = classes[i].match(re);
                                    if (match) {
                                        classes.splice(i, 1);
                                    }
                                }
                                classes.push(primaryType + '-' + style);
                            }
                            classes.push(primaryType);
                        }
                        return _utils2.default.unique(classes).join(' ').trim();
                    }
                }, {
                    key: 'closeConfirm',
                    value: function closeConfirm(overlay, dialog) {
                        if (!overlay) {
                            overlay = document.getElementsByClassName('form-builder-overlay')[0];
                        }
                        if (!dialog) {
                            dialog = document.getElementsByClassName('form-builder-dialog')[0];
                        }
                        overlay.classList.remove('visible');
                        (0, _dom.remove)(dialog);
                        (0, _dom.remove)(overlay);
                        document.dispatchEvent(_events2.default.modalClosed);
                    }
                }, {
                    key: 'editorLayout',
                    value: function editorLayout(controlPosition) {
                        var layoutMap = {
                            left: {
                                stage: 'pull-right',
                                controls: 'pull-left'
                            },
                            right: {
                                stage: 'pull-left',
                                controls: 'pull-right'
                            }
                        };
                        return layoutMap[controlPosition] || '';
                    }
                }, {
                    key: 'showOverlay',
                    value: function showOverlay() {
                        var _this = this;
                        var overlay = _utils2.default.markup('div', null, {
                            className: 'form-builder-overlay'
                        });
                        document.body.appendChild(overlay);
                        overlay.classList.add('visible');
                        overlay.onclick = function () {
                            _this.closeConfirm(overlay);
                        };
                        return overlay;
                    }
                }, {
                    key: 'confirm',
                    value: function confirm(message, yesAction) {
                        var coords = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
                        var className = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
                        var _this = this;
                        var i18n = _mi18n2.default.current;
                        var overlay = _this.showOverlay();
                        var yes = m('button', i18n.yes, {
                            className: 'yes btn btn-success btn-sm'
                        });
                        var no = m('button', i18n.no, {
                            className: 'no btn btn-danger btn-sm'
                        });
                        no.onclick = function () {
                            _this.closeConfirm(overlay);
                        };
                        yes.onclick = function () {
                            yesAction();
                            _this.closeConfirm(overlay);
                        };
                        var btnWrap = m('div', [no, yes], {
                            className: 'button-wrap'
                        });
                        className = 'form-builder-dialog ' + className;
                        var miniModal = m('div', [message, btnWrap], {
                            className: className
                        });
                        if (!coords) {
                            var dE = document.documentElement;
                            coords = {
                                pageX: Math.max(dE.clientWidth, window.innerWidth || 0) / 2,
                                pageY: Math.max(dE.clientHeight, window.innerHeight || 0) / 2
                            };
                            miniModal.style.position = 'fixed';
                        } else {
                            miniModal.classList.add('positioned');
                        }
                        miniModal.style.left = coords.pageX + 'px';
                        miniModal.style.top = coords.pageY + 'px';
                        document.body.appendChild(miniModal);
                        yes.focus();
                        return miniModal;
                    }
                }, {
                    key: 'dialog',
                    value: function dialog(content) {
                        var coords = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                        var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
                        var _this = this;
                        var clientWidth = document.documentElement.clientWidth;
                        var clientHeight = document.documentElement.clientHeight;
                        _this.showOverlay();
                        className = 'form-builder-dialog ' + className;
                        var miniModal = _utils2.default.markup('div', content, {
                            className: className
                        });
                        if (!coords) {
                            coords = {
                                pageX: Math.max(clientWidth, window.innerWidth || 0) / 2,
                                pageY: Math.max(clientHeight, window.innerHeight || 0) / 2
                            };
                            miniModal.style.position = 'fixed';
                        } else {
                            miniModal.classList.add('positioned');
                        }
                        miniModal.style.left = coords.pageX + 'px';
                        miniModal.style.top = coords.pageY + 'px';
                        document.body.appendChild(miniModal);
                        document.dispatchEvent(_events2.default.modalOpened);
                        if (className.indexOf('data-dialog') !== -1) {
                            document.dispatchEvent(_events2.default.viewData);
                        }
                        return miniModal;
                    }
                }, {
                    key: 'confirmRemoveAll',
                    value: function confirmRemoveAll(e) {
                        var _this = this;
                        var formID = e.target.id.match(/frmb-\d{13}/)[0];
                        var stage = document.getElementById(formID);
                        var i18n = _mi18n2.default.current;
                        var fields = $('li.form-field', stage);
                        var buttonPosition = e.target.getBoundingClientRect();
                        var bodyRect = document.body.getBoundingClientRect();
                        var coords = {
                            pageX: buttonPosition.left + buttonPosition.width / 2,
                            pageY: buttonPosition.top - bodyRect.top - 12
                        };
                        if (fields.length) {
                            _this.confirm(i18n.clearAllMessage, function () {
                                _this.removeAllFields.call(_this, stage);
                                _config.config.opts.notify.success(i18n.allFieldsRemoved);
                                _config.config.opts.onClearAll();
                            }, coords);
                        } else {
                            _this.dialog(i18n.noFieldsToClear, coords);
                        }
                    }
                }, {
                    key: 'removeAllFields',
                    value: function removeAllFields(stage) {
                        var _this2 = this;
                        var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
                        var i18n = _mi18n2.default.current;
                        var opts = _config.config.opts;
                        var fields = stage.querySelectorAll('li.form-field');
                        var markEmptyArray = [];
                        if (!fields.length) {
                            return false;
                        }
                        if (opts.prepend) {
                            markEmptyArray.push(true);
                        }
                        if (opts.append) {
                            markEmptyArray.push(true);
                        }
                        if (!markEmptyArray.some(function (elem) {
                            return elem === true;
                        })) {
                            stage.parentElement.classList.add('empty');
                            stage.parentElement.dataset.content = i18n.getStarted;
                        }
                        if (animate) {
                            stage.classList.add('removing');
                            var outerHeight = 0;
                            _utils2.default.forEach(fields, function (index) {
                                return outerHeight += fields[index].offsetHeight + 3;
                            });
                            fields[0].style.marginTop = -outerHeight + 'px';
                            setTimeout(function () {
                                (0, _dom.empty)(stage).classList.remove('removing');
                                _this2.save();
                            }, 400);
                        } else {
                            (0, _dom.empty)(stage);
                            this.save();
                        }
                    }
                }, {
                    key: 'setFieldOrder',
                    value: function setFieldOrder($cbUL) {
                        if (!_config.config.opts.sortableControls) {
                            return false;
                        }
                        var _window = window,
                            sessionStorage = _window.sessionStorage,
                            JSON = _window.JSON;
                        var fieldOrder = [];
                        $cbUL.children().each(function (index, element) {
                            var type = $(element).data('type');
                            if (type) {
                                fieldOrder.push(type);
                            }
                        });
                        if (sessionStorage) {
                            sessionStorage.setItem('fieldOrder', JSON.stringify(fieldOrder));
                        }
                        return fieldOrder;
                    }
                }, {
                    key: 'orderFields',
                    value: function orderFields(controls) {
                        var opts = _config.config.opts;
                        var controlOrder = opts.controlOrder.concat(controls);
                        var fieldOrder = void 0;
                        if (window.sessionStorage) {
                            if (opts.sortableControls) {
                                fieldOrder = window.sessionStorage.getItem('fieldOrder');
                            } else {
                                window.sessionStorage.removeItem('fieldOrder');
                            }
                        }
                        if (!fieldOrder) {
                            fieldOrder = _utils2.default.unique(controlOrder);
                        } else {
                            fieldOrder = window.JSON.parse(fieldOrder);
                            fieldOrder = _utils2.default.unique(fieldOrder.concat(controls));
                            fieldOrder = (0, _keys2.default)(fieldOrder).map(function (i) {
                                return fieldOrder[i];
                            });
                        }
                        fieldOrder.forEach(function (field) {
                            var randomKey = new RegExp('-[\\d]{4}$');
                            if (field.match(randomKey)) {
                                var baseFieldIndex = fieldOrder.indexOf(field.replace(randomKey, ''));
                                if (baseFieldIndex !== -1) {
                                    fieldOrder.splice(fieldOrder.indexOf(field), 1);
                                    fieldOrder.splice(baseFieldIndex + 1, fieldOrder.indexOf(field), field);
                                }
                            }
                        });
                        if (opts.disableFields.length) {
                            fieldOrder = fieldOrder.filter(function (type) {
                                return opts.disableFields.indexOf(type) == -1;
                            });
                        }
                        return fieldOrder.filter(Boolean);
                    }
                }, {
                    key: 'closeAllEdit',
                    value: function closeAllEdit() {
                        var _this = this;
                        var fields = $('> li.editing', _this.d.stage);
                        var toggleBtns = $('.toggle-form', _this.d.stage);
                        var editPanels = $('.frm-holder', fields);
                        toggleBtns.removeClass('open');
                        fields.removeClass('editing');
                        $('.prev-holder', fields).show();
                        editPanels.hide();
                    }
                }, {
                    key: 'toggleEdit',
                    value: function toggleEdit(fieldId) {
                        var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
                        var field = document.getElementById(fieldId);
                        var toggleBtn = $('.toggle-form', field);
                        if (!toggleBtn.length) return;
                        var editPanel = $('.frm-holder', field);
                        field.classList.toggle('editing');
                        toggleBtn.toggleClass('open');
                        if (animate) {
                            $('.prev-holder', field).slideToggle(250);
                            editPanel.slideToggle(250);
                        } else {
                            $('.prev-holder', field).toggle();
                            editPanel.toggle();
                        }
                        this.updatePreview($(field));
                    }
                }, {
                    key: 'stickyControls',
                    value: function stickyControls() {
                        var d = this.d;
                        var $cbWrap = $(d.controls).parent();
                        var $stageWrap = $(d.stage).parent();
                        var cbWidth = $cbWrap.width();
                        var cbPosition = d.controls.getBoundingClientRect();
                        $(window).scroll(function (evt) {
                            var scrollTop = $(evt.target).scrollTop();
                            var offsetDefaults = {
                                top: 5,
                                bottom: 'auto',
                                right: 'auto',
                                left: cbPosition.left
                            };
                            var offset = (0, _assign2.default)({}, offsetDefaults, _config.config.opts.stickyControls.offset);
                            if (scrollTop > $stageWrap.offset().top) {
                                var style = {
                                    position: 'fixed',
                                    width: cbWidth
                                };
                                var cbStyle = (0, _assign2.default)(style, offset);
                                var cbOffset = $cbWrap.offset();
                                var stageOffset = $stageWrap.offset();
                                var cbBottom = cbOffset.top + $cbWrap.height();
                                var stageBottom = stageOffset.top + $stageWrap.height();
                                var atBottom = cbBottom === stageBottom && cbOffset.top > scrollTop;
                                if (cbBottom > stageBottom && cbOffset.top !== stageOffset.top) {
                                    $cbWrap.css({
                                        position: 'absolute',
                                        top: 'auto',
                                        bottom: 0,
                                        right: 0,
                                        left: 'auto'
                                    });
                                }
                                if (cbBottom < stageBottom || atBottom) {
                                    $cbWrap.css(cbStyle);
                                }
                            } else {
                                d.controls.parentElement.removeAttribute('style');
                            }
                        });
                    }
                }, {
                    key: 'showData',
                    value: function showData() {
                        var data = this.data;
                        var formData = _utils2.default.escapeHtml(data.formData);
                        var code = m('code', formData, {
                            className: 'formData-' + _config.config.opts.dataType
                        });
                        this.dialog(m('pre', code), null, 'data-dialog');
                    }
                }, {
                    key: 'removeField',
                    value: function removeField(fieldID) {
                        var animationSpeed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
                        var fieldRemoved = false;
                        var _this = this;
                        var form = this.d.stage;
                        var fields = form.getElementsByClassName('form-field');
                        if (!fields.length) {
                            console.warn('No fields to remove');
                            return false;
                        }
                        if (!fieldID) {
                            var availableIds = [].slice.call(fields).map(function (field) {
                                return field.id;
                            });
                            console.warn('fieldID required to remove specific fields.');
                            console.warn('Removing last field since no ID was supplied.');
                            console.warn('Available IDs: ' + availableIds.join(', '));
                            fieldID = form.lastChild.id;
                        }
                        var field = document.getElementById(fieldID);
                        var $field = $(field);
                        if (!field) {
                            console.warn('Field not found');
                            return false;
                        }
                        $field.slideUp(animationSpeed, function () {
                            $field.removeClass('deleting');
                            $field.remove();
                            fieldRemoved = true;
                            _this.save();
                            if (!form.childNodes.length) {
                                var stageWrap = form.parentElement;
                                stageWrap.classList.add('empty');
                                stageWrap.dataset.content = _mi18n2.default.current.getStarted;
                            }
                        });
                        document.dispatchEvent(_events2.default.fieldRemoved);
                        return fieldRemoved;
                    }
                }, {
                    key: 'processActionButtons',
                    value: function processActionButtons(buttonData) {
                        var label = buttonData.label,
                            events = buttonData.events,
                            attrs = (0, _objectWithoutProperties3.default)(buttonData, ['label', 'events']);
                        var data = this.data;
                        if (!label) {
                            if (attrs.id) {
                                label = _mi18n2.default.current[attrs.id] || _utils2.default.capitalize(attrs.id);
                            } else {
                                label = '';
                            }
                        } else {
                            label = _mi18n2.default.current[label] || label;
                        }
                        if (!attrs.id) {
                            attrs.id = data.formID + '-action-' + Math.round(Math.random() * 1000);
                        } else {
                            attrs.id = data.formID + '-' + attrs.id + '-action';
                        }
                        var button = m('button', label, attrs);
                        if (events) {
                            var _loop = function _loop(event) {
                                if (events.hasOwnProperty(event)) {
                                    button.addEventListener(event, function (evt) {
                                        return events[event](evt);
                                    });
                                }
                            };
                            for (var event in events) {
                                _loop(event);
                            }
                        }
                        return button;
                    }
                }, {
                    key: 'processSubtypes',
                    value: function processSubtypes(subtypeOpts) {
                        for (var fieldType in subtypeOpts) {
                            if (subtypeOpts.hasOwnProperty(fieldType)) {
                                var controlClass = _control2.default.getClass(fieldType);
                                _control2.default.register(subtypeOpts[fieldType], controlClass, fieldType);
                            }
                        }
                        var subtypeDef = _control2.default.getRegisteredSubtypes();
                        var subtypes = {};
                        for (var _fieldType in subtypeDef) {
                            if (subtypeDef.hasOwnProperty(_fieldType)) {
                                var formatted = [];
                                var _iteratorNormalCompletion = true;
                                var _didIteratorError = false;
                                var _iteratorError = undefined;
                                try {
                                    for (var _iterator = (0, _getIterator3.default)(subtypeDef[_fieldType]), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
                                        var subtype = _step.value;
                                        var _controlClass = _control2.default.getClass(_fieldType, subtype);
                                        formatted.push({
                                            label: _controlClass.mi18n(subtype),
                                            value: subtype
                                        });
                                    }
                                } catch (err) {
                                    _didIteratorError = true;
                                    _iteratorError = err;
                                } finally {
                                    try {
                                        if (!_iteratorNormalCompletion && _iterator.return) {
                                            _iterator.return();
                                        }
                                    } finally {
                                        if (_didIteratorError) {
                                            throw _iteratorError;
                                        }
                                    }
                                }
                                subtypes[_fieldType] = formatted;
                            }
                        }
                        return subtypes;
                    }
                }, {
                    key: 'editorUI',
                    value: function editorUI(formID) {
                        var d = this.d;
                        var data = this.data;
                        d.stage = m('ul', null, {
                            id: data.formID,
                            className: 'frmb'
                        });
                        d.controls = m('ul', null, {
                            id: data.formID + '-control-box',
                            className: 'frmb-control'
                        });
                    }
                }, {
                    key: 'processOptions',
                    value: function processOptions(options) {
                        var _this = this;
                        var actionButtons = options.actionButtons,
                            replaceFields = options.replaceFields,
                            opts = (0, _objectWithoutProperties3.default)(options, ['actionButtons', 'replaceFields']);
                        actionButtons = [{
                            type: 'button',
                            id: 'clear',
                            className: 'clear-all btn btn-danger',
                            events: {
                                click: _this.confirmRemoveAll.bind(_this)
                            }
                        }, {
                            type: 'button',
                            label: 'viewJSON',
                            id: 'data',
                            className: 'btn btn-default get-data',
                            events: {
                                click: _this.showData.bind(_this)
                            }
                        }, {
                            type: 'button',
                            id: 'save',
                            className: 'btn btn-primary save-template',
                            events: {
                                click: function click(evt) {
                                    _this.save();
                                    _config.config.opts.onSave(evt, _this.data.formData);
                                }
                            }
                        }].concat(options.actionButtons);
                        opts.fields = opts.fields.concat(replaceFields);
                        opts.disableFields = opts.disableFields.concat(replaceFields.map(function (_ref) {
                            var type = _ref.type;
                            return type && type;
                        }));
                        _config.config.opts = (0, _assign2.default)({}, {
                            actionButtons: actionButtons
                        }, opts);
                        return _config.config.opts;
                    }
                }, {
                    key: 'input',
                    value: function input() {
                        var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
                        return m('input', null, attrs);
                    }
                }, {
                    key: 'getFormData',
                    value: function getFormData() {
                        var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'js';
                        var formatted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
                        var h = this;
                        var data = {
                            js: function js() {
                                    return h.prepData(h.d.stage);
                                },
                                xml: function xml() {
                                    return h.xmlSave(h.d.stage);
                                },
                                json: function json(formatted) {
                                    var formData = void 0;
                                    if (formatted) {
                                        formData = window.JSON.stringify(h.prepData(h.d.stage), null, '\t');
                                    } else {
                                        formData = window.JSON.stringify(h.prepData(h.d.stage));
                                    }
                                    return formData;
                                }
                        };
                        return data[type](formatted);
                    }
                }]);
            return Helpers;
        }();
        exports.default = Helpers;
    }, {
        "./config": 155,
        "./control": 156,
        "./control/custom": 159,
        "./data": 169,
        "./dom": 170,
        "./events": 171,
        "./utils": 175,
        "babel-runtime/core-js/get-iterator": 3,
        "babel-runtime/core-js/object/assign": 6,
        "babel-runtime/core-js/object/keys": 11,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "mi18n": 151
    }
], 174: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _typeof2 = require('babel-runtime/helpers/typeof');
        var _typeof3 = _interopRequireDefault(_typeof2);
        var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
        var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
        var _createClass2 = require('babel-runtime/helpers/createClass');
        var _createClass3 = _interopRequireDefault(_createClass2);
        var _utils = require('./utils');
        var _utils2 = _interopRequireDefault(_utils);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var layout = function () {
            function layout(templates, preview) {
                    var _this = this;
                    (0, _classCallCheck3.default)(this, layout);
                    this.preview = preview;
                    this.templates = {
                        label: null,
                        help: null,
                        default: function _default(field, label, help, data) {
                                if (help) {
                                    label.appendChild(help);
                                }
                                var className = data.id ? 'fb-' + data.type + ' form-group field-' + data.id : '';
                                return _this.markup('div', [label, field], {
                                    className: className
                                });
                            },
                            noLabel: function noLabel(field, label, help, data) {
                                var className = data.id ? 'fb-' + data.type + ' form-group field-' + data.id : '';
                                return _this.markup('div', field, {
                                    className: className
                                });
                            },
                            hidden: function hidden(field, label, help, data) {
                                return field;
                            }
                    };
                    if (templates) {
                        this.templates = $.extend(this.templates, templates);
                    }
                    this.configure();
                }
                (0, _createClass3.default)(layout, [{
                    key: 'configure',
                    value: function configure() {}
                }, {
                    key: 'build',
                    value: function build(renderControl, data, forceTemplate) {
                        if (this.preview) {
                            if (data.name) {
                                data.name = data.name + '-preview';
                            } else {
                                data.name = _utils2.default.nameAttr(data) + '-preview';
                            }
                        }
                        data.id = data.name;
                        this.data = $.extend({}, data);
                        var control = new renderControl(data, this.preview);
                        var field = control.build();
                        if ((typeof field === 'undefined' ? 'undefined' : (0, _typeof3.default)(field)) !== 'object' || !field.field) {
                            field = {
                                field: field
                            };
                        }
                        var label = this.label();
                        var help = this.help();
                        var elementTemplate = void 0;
                        if (forceTemplate && this.isTemplate(forceTemplate)) {
                            elementTemplate = forceTemplate;
                        } else {
                            elementTemplate = this.isTemplate(field.layout) ? field.layout : 'default';
                        }
                        var element = this.processTemplate(elementTemplate, field.field, label, help);
                        control.on('prerender')(element);
                        element.addEventListener('fieldRendered', control.on('render'));
                        return element;
                    }
                }, {
                    key: 'label',
                    value: function label() {
                        var label = this.data.label || '';
                        var labelText = _utils2.default.parsedHtml(label);
                        var labelContents = [labelText];
                        if (this.data.required) {
                            labelContents.push(this.markup('span', '*', {
                                className: 'fb-required'
                            }));
                        }
                        if (this.isTemplate('label')) {
                            return this.processTemplate('label', labelContents);
                        }
                        return this.markup('label', labelContents, {
                            for: this.data.id,
                            className: 'fb-' + this.data.type + '-label'
                        });
                    }
                }, {
                    key: 'help',
                    value: function help() {
                        if (!this.data.description) {
                            return null;
                        }
                        if (this.isTemplate('help')) {
                            return this.processTemplate('help', this.data.description);
                        }
                        return this.markup('span', '?', {
                            className: 'tooltip-element',
                            tooltip: this.data.description
                        });
                    }
                }, {
                    key: 'isTemplate',
                    value: function isTemplate(template) {
                        return typeof this.templates[template] === 'function';
                    }
                }, {
                    key: 'processTemplate',
                    value: function processTemplate(template) {
                        var _templates;
                        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                            args[_key - 1] = arguments[_key];
                        }
                        var processed = (_templates = this.templates)[template].apply(_templates, args.concat([this.data]));
                        if (processed.jquery) {
                            processed = processed[0];
                        }
                        return processed;
                    }
                }, {
                    key: 'markup',
                    value: function markup(tag) {
                        var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
                        var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
                        return _utils2.default.markup(tag, content, attributes);
                    }
                }]);
            return layout;
        }();
        exports.default = layout;
    }, {
        "./utils": 175,
        "babel-runtime/helpers/classCallCheck": 17,
        "babel-runtime/helpers/createClass": 18,
        "babel-runtime/helpers/typeof": 25
    }
], 175: [

    function (require, module, exports) {
        'use strict';
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var _assign = require('babel-runtime/core-js/object/assign');
        var _assign2 = _interopRequireDefault(_assign);
        var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
        var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
        var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
        var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
        var _typeof2 = require('babel-runtime/helpers/typeof');
        var _typeof3 = _interopRequireDefault(_typeof2);

        function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
                default: obj
            };
        }
        var utils = {};
        window.fbLoaded = {
            js: [],
            css: []
        };
        window.fbEditors = {
            quill: {},
            tinymce: {}
        };
        utils.inArray = function (needle, haystack) {
            return haystack.indexOf(needle) !== -1;
        };
        utils.trimObj = function (attrs) {
            var xmlRemove = [null, undefined, '', false, 'false'];
            for (var attr in attrs) {
                if (utils.inArray(attrs[attr], xmlRemove)) {
                    delete attrs[attr];
                } else if (Array.isArray(attrs[attr])) {
                    if (!attrs[attr].length) {
                        delete attrs[attr];
                    }
                }
            }
            return attrs;
        };
        utils.validAttr = function (attr) {
            var invalid = ['values', 'enableOther', 'other', 'label', 'subtype'];
            return !utils.inArray(attr, invalid);
        };
        utils.attrString = function (attrs) {
            var attributes = [];
            for (var attr in attrs) {
                if (attrs.hasOwnProperty(attr) && utils.validAttr(attr)) {
                    attr = utils.safeAttr(attr, attrs[attr]);
                    attributes.push(attr.name + attr.value);
                }
            }
            return attributes.join(' ');
        };
        utils.safeAttr = function (name, value) {
            name = utils.safeAttrName(name);
            var valString = void 0;
            if (value) {
                if (Array.isArray(value)) {
                    valString = utils.escapeAttr(value.join(' '));
                } else {
                    if (typeof value === 'boolean') {
                        value = value.toString();
                    }
                    valString = utils.escapeAttr(value.replace(',', ' ').trim());
                }
            }
            value = value ? '="' + valString + '"' : '';
            return {
                name: name,
                value: value
            };
        };
        utils.safeAttrName = function (name) {
            var safeAttr = {
                className: 'class'
            };
            return safeAttr[name] || utils.hyphenCase(name);
        };
        utils.hyphenCase = function (str) {
            str = str.replace(/[^\w\s\-]/gi, '');
            str = str.replace(/([A-Z])/g, function ($1) {
                return '-' + $1.toLowerCase();
            });
            return str.replace(/\s/g, '-').replace(/^-+/g, '');
        };
        utils.camelCase = function (str) {
            return str.replace(/-([a-z])/g, function (m, w) {
                return w.toUpperCase();
            });
        };
        utils.contentType = function (content) {
            var type = typeof content === 'undefined' ? 'undefined' : (0, _typeof3.default)(content);
            if (content instanceof Node || content instanceof HTMLElement) {
                type = 'node';
            } else if (Array.isArray(content)) {
                type = 'array';
            }
            return type;
        };
        utils.bindEvents = function (element, events) {
            if (events) {
                var _loop = function _loop(event) {
                    if (events.hasOwnProperty(event)) {
                        element.addEventListener(event, function (evt) {
                            return events[event](evt);
                        });
                    }
                };
                for (var event in events) {
                    _loop(event);
                }
            }
        };
        utils.nameAttr = function (field) {
            var epoch = new Date().getTime();
            var prefix = field.type || utils.hyphenCase(field.label);
            return prefix + '-' + epoch;
        };
        utils.markup = function (tag) {
            var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            var contentType = utils.contentType(content);
            var events = attributes.events,
                attrs = (0, _objectWithoutProperties3.default)(attributes, ['events']);
            var field = document.createElement(tag);
            var appendContent = {
                string: function string(content) {
                        field.innerHTML += content;
                    },
                    object: function object(config) {
                        var tag = config.tag,
                            content = config.content,
                            data = (0, _objectWithoutProperties3.default)(config, ['tag', 'content']);
                        return field.appendChild(utils.markup(tag, content, data));
                    },
                    node: function node(content) {
                        return field.appendChild(content);
                    },
                    array: function array(content) {
                        for (var i = 0; i < content.length; i++) {
                            contentType = utils.contentType(content[i]);
                            appendContent[contentType](content[i]);
                        }
                    },
                    function: function _function(content) {
                        content = content();
                        contentType = utils.contentType(content);
                        appendContent[contentType](content);
                    },
                    undefined: function undefined() {}
            };
            for (var attr in attrs) {
                if (attrs.hasOwnProperty(attr)) {
                    var name = utils.safeAttrName(attr);
                    field.setAttribute(name, attrs[attr]);
                }
            }
            if (content) {
                appendContent[contentType].call(this, content);
            }
            utils.bindEvents(field, events);
            return field;
        };
        utils.parseAttrs = function (elem) {
            var attrs = elem.attributes;
            var data = {};
            utils.forEach(attrs, function (attr) {
                var attrVal = attrs[attr].value || '';
                if (attrVal.match(/false|true/g)) {
                    attrVal = attrVal === 'true';
                } else if (attrVal.match(/undefined/g)) {
                    attrVal = undefined;
                }
                if (attrVal) {
                    data[attrs[attr].name] = attrVal;
                }
            });
            return data;
        };
        utils.parseOptions = function (options) {
            var optionData = {};
            var data = [];
            for (var i = 0; i < options.length; i++) {
                optionData = utils.parseAttrs(options[i]);
                optionData.label = options[i].textContent;
                data.push(optionData);
            }
            return data;
        };
        utils.parseXML = function (xmlString) {
            var parser = new window.DOMParser();
            var xml = parser.parseFromString(xmlString, 'text/xml');
            var formData = [];
            if (xml) {
                var fields = xml.getElementsByTagName('field');
                for (var i = 0; i < fields.length; i++) {
                    var fieldData = utils.parseAttrs(fields[i]);
                    var options = fields[i].getElementsByTagName('option');
                    if (options && options.length) {
                        fieldData.values = utils.parseOptions(options);
                    }
                    formData.push(fieldData);
                }
            }
            return formData;
        };
        utils.parsedHtml = function (html) {
            var escapeElement = document.createElement('textarea');
            escapeElement.innerHTML = html;
            return escapeElement.textContent;
        };
        utils.escapeHtml = function (html) {
            var escapeElement = document.createElement('textarea');
            escapeElement.textContent = html;
            return escapeElement.innerHTML;
        };
        utils.escapeAttr = function (str) {
            var match = {
                '"': '&quot;',
                '&': '&amp;',
                '<': '&lt;',
                '>': '&gt;'
            };
            var replaceTag = function replaceTag(tag) {
                return match[tag] || tag;
            };
            return typeof str === 'string' ? str.replace(/["&<>]/g, replaceTag) : str;
        };
        utils.escapeAttrs = function (attrs) {
            for (var attr in attrs) {
                if (attrs.hasOwnProperty(attr)) {
                    attrs[attr] = utils.escapeAttr(attrs[attr]);
                }
            }
            return attrs;
        };
        utils.forEach = function (array, callback, scope) {
            for (var i = 0; i < array.length; i++) {
                callback.call(scope, i, array[i]);
            }
        };
        utils.unique = function (array) {
            return array.filter(function (elem, pos, arr) {
                return arr.indexOf(elem) === pos;
            });
        };
        utils.remove = function (val, arr) {
            var index = arr.indexOf(val);
            if (index > -1) {
                arr.splice(index, 1);
            }
        };
        utils.getScripts = function (scriptScr, path) {
            var $ = jQuery;
            var _arr = [];
            if (!Array.isArray(scriptScr)) {
                scriptScr = [scriptScr];
            }
            if (!utils.isCached(scriptScr)) {
                _arr = $.map(scriptScr, function (src) {
                    var options = {
                        dataType: 'script',
                        cache: true,
                        url: (path || '') + src
                    };
                    return $.ajax(options).done(function () {
                        return window.fbLoaded.js.push(src);
                    });
                });
            }
            _arr.push($.Deferred(function (deferred) {
                return $(deferred.resolve);
            }));
            return $.when.apply($, (0, _toConsumableArray3.default)(_arr));
        };
        utils.isCached = function (src) {
            var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'js';
            var isCached = false;
            var cache = window.fbLoaded[type];
            if (Array.isArray(src)) {
                isCached = src.every(function (s) {
                    return utils.inArray(s, cache);
                });
            } else {
                isCached = utils.inArray(src, cache);
            }
            return isCached;
        };
        utils.getStyles = function (scriptScr, path) {
            if (!Array.isArray(scriptScr)) {
                scriptScr = [scriptScr];
            }
            scriptScr.forEach(function (src) {
                var type = 'href';
                var key = src;
                var id = '';
                if ((typeof src === 'undefined' ? 'undefined' : (0, _typeof3.default)(src)) == 'object') {
                    type = src.type || (src.style ? 'inline' : 'href');
                    id = src.id;
                    src = type == 'inline' ? src.style : src.href;
                    key = id || src.href || src.style;
                }
                if (utils.isCached(key, 'css')) {
                    return;
                }
                if (type == 'href') {
                    var link = document.createElement('link');
                    link.type = 'text/css';
                    link.rel = 'stylesheet';
                    link.href = (path || '') + src;
                    document.head.appendChild(link);
                } else {
                    $('<style type="text/css">' + src + '</style>').attr('id', id).appendTo($(document.head));
                }
                window.fbLoaded.css.push(key);
            });
        };
        utils.capitalize = function (str) {
            return str.replace(/\b\w/g, function (m) {
                return m.toUpperCase();
            });
        };
        utils.merge = function (obj1, obj2) {
            var mergedObj = (0, _assign2.default)({}, obj1, obj2);
            for (var prop in obj2) {
                if (mergedObj.hasOwnProperty(prop)) {
                    if (Array.isArray(obj2[prop])) {
                        mergedObj[prop] = Array.isArray(obj1[prop]) ? utils.unique(obj1[prop].concat(obj2[prop])) : obj2[prop];
                    } else if ((0, _typeof3.default)(obj2[prop]) === 'object') {
                        mergedObj[prop] = utils.merge(obj1[prop], obj2[prop]);
                    } else {
                        mergedObj[prop] = obj2[prop];
                    }
                }
            }
            return mergedObj;
        };
        utils.addEventListeners = function (el, evts, fn) {
            return evts.split(' ').forEach(function (e) {
                return el.addEventListener(e, fn, false);
            });
        };
        utils.closest = function (el, cls) {
            var className = cls.replace('.', '');
            while ((el = el.parentElement) && !el.classList.contains(className)) {}
            return el;
        };
        utils.noop = function () {
            return null;
        };
        utils.debounce = function (func) {
            var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
            var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
            var timeout = void 0;
            return function () {
                for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                    args[_key] = arguments[_key];
                }
                var context = this;
                var later = function later() {
                    timeout = null;
                    if (!immediate) {
                        func.apply(context, args);
                    }
                };
                var callNow = immediate && !timeout;
                clearTimeout(timeout);
                timeout = setTimeout(later, wait);
                if (callNow) {
                    func.apply(context, args);
                }
            };
        };
        utils.mobileClass = function () {
            var mobileClass = '';
            (function (a) {
                if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) {
                    mobileClass = ' fb-mobile';
                }
            })(navigator.userAgent || navigator.vendor || window.opera);
            return mobileClass;
        };
        utils.makeClassName = function (str) {
            return utils.hyphenCase(str.replace(/[^\w\s\-]/gi, ''));
        };
        utils.safename = function (str) {
            return str.replace(/\s/g, '-').replace(/[^a-zA-Z0-9\[\]\_-]/g, '').toLowerCase();
        };
        utils.forceNumber = function (str) {
            return str.replace(/[^0-9]/g, '');
        };
        exports.default = utils;
    }, {
        "babel-runtime/core-js/object/assign": 6,
        "babel-runtime/helpers/objectWithoutProperties": 21,
        "babel-runtime/helpers/toConsumableArray": 24,
        "babel-runtime/helpers/typeof": 25
    }
]
}, {}, [172])
}(jQuery));